Tag Info

Hot answers tagged

7

Potential Method #1 - F_DROP_CACHES I found a method from 2012 that discusses a proposed patch to the Linux kernel in this mail thread titled: Re: [RFC Patch] fs: implement per-file drop caches. excerpt Cong> This is a draft patch of implementing per-file drop caches. Interesting. So can I do this from outside a process? I'm a SysAdmin, so my ...


4

The value can only be extended up to a theoretical maximum of 32768 for 32 bit systems or 4194304 for 64 bit.


3

It could be untrusted X11 forwarding timeout. Using the ForwardX11Timeout option with a large timeout may help, as suggested in https://bugzilla.mindrot.org/show_bug.cgi?id=1718 (I got this problem in the past, but IIRC, it disappeared after some upgrade).


3

You have to make a softlink with the name K36xyz. The K at the start stands for Kill. You used S which stands for Start Additionally, custom is to test $1 within the script, as the Sxy links/scripts are invoked with start as a parameter and the Kxy ones with stop. That way you can use the same script for starting and stopping a service if you make the ...


3

You probably want -I INPUT instead of -A INPUT. -A INPUT is going to add the rule to the bottom of the chain. Meaning that if you have something like -p tcp --dport 25 -j ACCEPT before it, the ACCEPT is going to match first, and the processing will never get to your -j DROP rule. The -I INPUT will add the rule to the top, so it overrides everything else.


3

For general purpose tabular alignment, you want the column utility. For example: ( printf 'PID\tUSER\tAPPNAME\n' printf '%s\t%s\t%s\n' "1" "john" "foo bar" printf '%s\t%s\t%s\n' "12345678" "someone_with_a_long_name" "pop tart" ) | column -t -s $'\t' Results in: PID USER APPNAME 1 john foo bar ...


3

That's what smartctl -H does: it gives you a pass (no failure predicted) or fail (failure predicted in next 24h). SMART unfortunately doesn't give any way to ask a drive its expected remaining lifespan, other than that. Other than SSDs with their limited write durability, it probably isn't even possible to do in general. You can get less output from ...


3

Each package that compiles with the Debian policy contains a changelog file in /usr/share/doc/PACKAGE-NAME/changelog.Debian. The file may be called changelog.gz if the package is built from a native Debian source. The latest entry in the changelog is supposed to be the time the package was finalized, i.e. it's after the last change to the package source and ...


3

If you're running 32-bit Windows 7 on a 64-bit processor, then VirtualBox can run a 64-bit guest with a few caveats: 3.1.2. 64-bit guests VirtualBox supports 64-bit guest operating systems, even on 32-bit host operating systems, provided that the following conditions are met: You need a 64-bit processor with hardware virtualization support ...


3

From the CentOS wiki: CentOS aims to be 100% binary compatible with its upstream source, Red Hat Enterprise Linux (RHEL) From the Red Hat website: Red Hat Enterprise Linux 7 will only provide 64-bit ISO's, thus allowing only a 64-bit operating environment. However, 32-bit is supported in the following ways: RHEL 7 will continue to ...


2

You can use the mysqladmin command. The following command will create a database named 'abcd' from shell. mysqladmin -u root -p<yourpasswd> create abcd Please note that there is no space between -p and the password. If you wish to run the command without the password in the command line, you can do it without it, but then it will ask for the ...


2

You can use the following syntax to achieve this from e.g. a bash-script: mysql -u [user] -p[pass] << EOF [mysql commands] EOF


2

One option to do a quick test could be to use a KGDB enabled kernel and stop the kernel manually and test, see this link. On another note, things I remember that could cause your pauses: cpufreq, cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency, the value is in ns (4000 in my AMD FX(tm)-8120 Eight-Core Processor) shouldn't be a problem, ...


2

With Microsoft abandoning Silverlight, Netflix has made strong efforts to switch their video delivery software to HTML5. An HTML5 video player does not need a browser plugin like Adobe Flash or Microsoft Silverlight to work. However, in order to stream videos, Netflix requires their delivered content to remain secure. This is achieved in HTML5 via a browser ...


2

Check build date of installed software, eg aptitude. This won't work if the software had a security upgrade, but otherwise the earlist compilation time from of a bunch of packages that do report their compile times would give you some idea. My system is Debian 7.6 (wheezy). Here are some examples from my machine. aptitude faheem@orwell:~$ aptitude ...


2

Here's another one using the output formatting from ps: #!/usr/bin/sh -f printf '%-8.7s%-8s%s\n' $( ps -o uname=UID,pid=PID,args=APPNAME | sed -n '1p;s/\( [0-9]* \).*\(-Dapp.name=[^ ]*\).*/\1\2/p' ) Based on its format string, for every 3 of its arguments printf will print: The first space-padded on the right to a standard tab-width of 8 ...


2

bind9 uses the time-to-live (TTL) values specified as part of each DNS record to determine how long to cache it. That's what's required by the DNS standards. There doesn't seem to be an easy way to override that in bind, and upstream isn't likely to change that because it's generally a bad idea. One option is to run Debian's version of bind9; they have ...


2

Replace for file_name in `ls -Al ${source_folder}*"${file_pattern}"*.csv` With: for file_name in "${source_folder}"*"${file_pattern}"*.csv The output of a command in backticks, as in the first form above, is subject to word-splitting. The second form above does not use backticks. It will, by contrast, work with any file name, even ones that contain ...


2

Make sure you are not running out of disk space Run df and make sure you have sufficient disk space, if you are low on disk space remove unnecessary files from your system: $ df -h Make sure ~/.Xauthority owned by you Run following command to find ownweship: $ ls -l ~/.Xauthority Run chown and chmod to fix permission problems [replace user:group with ...


2

In order to run a program, it must be in RAM. During thrashing, all programs get swapped out of RAM and then have to be swapped in again before they can run. Additionally, for many (but not all) input events, there must be a round trip between your X11 server and your window manager, and the window manager may try to trigger additional events. And since you ...


1

This command worked in the end, executed on my beaglebone as root: pkill -USR1 -n -x dd I could run the command over and over again and it would indeed update (slow transfer). Interestingly, the update would appear on the other Terminal window (i.e. the one executing the dd command): Debian GNU/Linux 7 BeagleBoard.org BeagleBone Debian Image 2014-04-23 ...


1

I guess almost all Distros have a minimal version without GUI. Dont know any below 80MB, but I suggest the CentOS minimal, which is around 400MB. But there are distros below 80MB but they include both GUI and CLI. So I guess if 80MB is your limit you can use them and simply not use the GUI. Slitaz is just cool. Damn Small Linux (DSL) lol :D just 10MB.


1

Also can this script be optimized into one line command? I'd consider using the -o option of the ps command to output (as far as possible) only the fields of interest, and then post-processing that to match the java processes and specific command argument(s) that you require - something like ps -u $USER -o uname=,pid=,args= | gawk -vOFS='\t' ...


1

Use dd to read a section of a file without reading everything preceding it.  For your example (reading bytes 4,120,000-4,120,400) you could use dd bs=400 skip=10300 count=1 if=your_input_file of=your_output_file This defines a logical block size of 400 bytes, and then tells dd to skip the first 10300 “logical blocks” of the input file (if).  10300 is ...


1

The linux kernel does cache management automatically. Everthing that is loaded into RAM, stays there until another process needs RAM and there is no more available. So in the linux kernel RAM should always be full. You system has 128GB of RAM, thats more than enough for a 100-1000MB file. To load a huge file into RAM just cat it: cat huge_file > ...


1

Most programs and scripts I've seen parse the usual files in /etc, AFAIK there's no other way: On Redhat, look for /etc/redhat-release On Debian, look for /etc/debian_version Mandriva has /etc/version and Slackware has /etc/slackware-version You could also use uname to get the ARCH or, probably the most sane way, use lsb_release.


1

This can be done without problems, assuming you're talking about RAID1. Create the RAID1 with e.g mdadm --create --level 1 -n 2 /dev/mdX /dev/sdaX --write-mostly /dev/sdbX The --write-mostly tells mdadm that the following devices are slower to access and hence mostly only to be written to (or put another way: mostly read from the other device(s) which is ...


1

Because of the other answers did not answer your question completely here are the right answer: To fire up an sql script via command line you have to execute: mysql -u [USERNAME] -p < /path/to/sqlscript [USERNAME] must be the database administrator or another user with sufficient rights to create a database. The password will be asked after execution. ...


1

The RPM's are out for RHEL [6|7] and siblings (i.e., CentOS et al.) and available via yum at most repositories. Please note that these RPM's address a portion of the "POODLE" vulnerabilities per: CVE-2014-3567, CVE-2014-3566, and CVE-2014-3513 SEE: cert.gov The security update does not address some specific SSLv3 problems, so those with servers ...


1

You can do it using reredirect (https://github.com/jerome-pouiller/reredirect/). reredirect -m /dev/null <PID> You can restore initial output of your process later using something like: reredirect -N -O <M> -E <N> <PID> (<M> and <N> are provided by previous launch of reredirect). reredirect README also explains how ...



Only top voted, non community-wiki answers of a minimum length are eligible