title: change interrupt smp_affinity

text: As you can see below, nvidia is sharing the intrerrupt and the interrupt is using only CPU0, how can I change the interrupt for nvidia, and how can I make it use both CPU's ?   Here is an article describing the second question, I can change between CPU0 and CPU1 by modifing smp_affinity, but did not understand how can I set it to use both CPU's. Acording to this blog setting smp_affinity to 3 should use both CPU0 and CPU1. Actualy in my case, it uses CPU0 (behaving like it was set to 1). Setting it to 2 uses CPU1.               radu@radu-work:~$ cat /proc/interrupts                CPU0       CPU1              0:         79          0   IO-APIC-edge      timer       1:          9      17152   IO-APIC-edge      i8042       4:          2          0   IO-APIC-edge           6:          5          0   IO-APIC-edge      floppy       7:          0          0   IO-APIC-edge      parport0       8:          1          0   IO-APIC-edge      rtc0       9:          0          0   IO-APIC-fasteoi   acpi      12:     694613          0   IO-APIC-edge      i8042      16:    1233922          0   IO-APIC-fasteoi   uhci_hcd:usb3, ahci, nvidia      17:       3961     168757   IO-APIC-fasteoi   uhci_hcd:usb4, pata_jmicron      18:          0          0   IO-APIC-fasteoi   ehci_hcd:usb1, uhci_hcd:usb7      19:         59          0   IO-APIC-fasteoi   ata_piix, ata_piix, uhci_hcd:usb6      22:        819       6915   IO-APIC-fasteoi   HDA Intel      23:          2          0   IO-APIC-fasteoi   ehci_hcd:usb2, uhci_hcd:usb5, eth               radu@radu-work:~$ sudo cat /proc/irq/16/smp_affinity      1          root@radu-work:~# uname -a     Linux radu-work 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:54:21 UTC 2011 i686 GNU/Linux      Thank you. **EDIT:** I am triyng to get my Linux box to play HD movies (at least 720). I have an nvidia 66xx series, Linux version Ubuntu 11.04, I have nvidia proprietary drivers instaled, but they do not suport hardware acceleration (and video decoding) for old harware (just 8xxx series and above) so the decoding is done in software. When I try to see a HD movie the image frozes for a few seconds, works a couple of seconds then frozes again. The CPU usage cougth my attention, nvidia drivers were using just one CPU, so I thouth that if I can make nvidia use both CPU's maybe I will have a better performance, and be able to finaly watch HD movies on my Linux box. By the way, I have tried every posible Linux player: mplayer (even nightly builds), totem, vlc and many more ... **EDIT:** irqbalance --debug               root@radu-work:/# irqbalance --debug     Package 0:  cpu mask is 00000001 (workload 0)             Cache domain 0: cpu mask is 00000001  (workload 0)                      CPU number 0  (workload 0)                     CPU number 0  (workload 0)     Package 0:  cpu mask is 00000003 (workload 0)             Cache domain 0: cpu mask is 00000003  (workload 0)                      CPU number 0  (workload 0)                     CPU number 1  (workload 0)     Interrupt 44 (class ethernet) has workload 7      Interrupt 0 (class timer) has workload 0      Interrupt 16 (class storage) has workload 122      Interrupt 17 (class storage) has workload 29      Interrupt 19 (class storage) has workload 0      Interrupt 45 (class legacy) has workload 2      Interrupt 1 (class legacy) has workload 2      Interrupt 12 (class legacy) has workload 0      -----------------------------------------------------------------------------     IRQ delta is 152640      Rescanning cpu topology      Package 0:  cpu mask is 00000001 (workload 0)             Cache domain 0: cpu mask is 00000001  (workload 0)                      CPU number 0  (workload 0)                     CPU number 0  (workload 0)     Package 0:  cpu mask is 00000003 (workload 0)             Cache domain 0: cpu mask is 00000003  (workload 0)                      CPU number 0  (workload 0)                     CPU number 1  (workload 0)     Package 0:  cpu mask is 00000001 (workload 16)             Cache domain 0: cpu mask is 00000001  (workload 16)                      CPU number 0  (workload 3)                       Interrupt 44 (ethernet/2)                      CPU number 0  (workload 0)               Interrupt 17 (storage/9)                Interrupt 19 (storage/0)                Interrupt 45 (legacy/0)                Interrupt 12 (legacy/0)      Package 0:  cpu mask is 00000003 (workload 42)             Cache domain 0: cpu mask is 00000003  (workload 42)                      CPU number 0  (workload 0)                     CPU number 1  (workload 0)               Interrupt 16 (storage/40)                Interrupt 1 (legacy/0)           -----------------------------------------------------------------------------     ...     -----------------------------------------------------------------------------     IRQ delta is 10      IRQ delta is 10, switching to power mode      Rescanning cpu topology      Package 0:  cpu mask is 00000001 (workload 0)             Cache domain 0: cpu mask is 00000001  (workload 0)                      CPU number 0  (workload 0)                     CPU number 0  (workload 0)     Package 0:  cpu mask is 00000003 (workload 0)             Cache domain 0: cpu mask is 00000003  (workload 0)                      CPU number 0  (workload 0)                     CPU number 1  (workload 0)     Package 0:  cpu mask is 00000001 (workload 38)             Cache domain 0: cpu mask is 00000001  (workload 38)                      CPU number 0  (workload 36)                       Interrupt 44 (ethernet/35)                      CPU number 0  (workload 0)               Interrupt 16 (storage/0)                Interrupt 1 (legacy/0)      Package 0:  cpu mask is 00000003 (workload 4)             Cache domain 0: cpu mask is 00000003  (workload 4)                      CPU number 0  (workload 0)                     CPU number 1  (workload 0)               Interrupt 19 (storage/0)                Interrupt 17 (storage/0)                Interrupt 45 (legacy/0)                Interrupt 12 (legacy/0)


title: Where are recognizers for media types stored and how to add one?

text: When one writes a html file, linux can state that the MIME-type is text/html. How is this handled? Where are the "recognizers" stored? How can one add a MIME type with with an implemented recognizer?


title: Using sed to edit lines in a file with a variable

text: I need to edit lines in a file using `sed`. Now the problem is I am replacing a particular pattern with a combination of text and number. This number is a variable which keeps on incrementing for every subsequent line. Now as `sed` executes the command for all lines in one go, it is replacing the pattern found with the text and fixed number (i.e initial value of number). For example:               k = 10     sed "s/raj/ram${k++}/"


title: debian update-problem

text: When I run `sudo apt-get upgrade`:               libc6-i386:dependency: libc6 (= 2.17-93) but 2.17-92+b1 have been installed;      so `dpkg` gives an error and all the updates can not continue. If I try `sudo apt-get -f install`:               A copy of the C library was found in an unexpected directory:     '/lib/x86_64-linux-gnu/libc-2.17.so'     It is not safe to upgrade the C library in this situation;     please remove that copy of the C library or get it out of     '/lib/x86_64-linux-gnu' and try again.          dpkg: error processing /var/cache/apt/archives/libc6_2.17-93_amd64.deb (--unpack):      I have opened the multiarch support. It's the libc6-i386 problem. Is there anyone that has seen this problem before? What should I do? I have searched some kind of solution which refers to chroot way, a little bit complicated. And I have checked the bug list of debian. It seems like that a long time ago someone has reported the same problem.


title: Debian: version numbers (now/then) and changelog for all upgradable packages

text: I'm currently have both Lenny and Squeeze installations. I want to know how to:   * list of all packages which are upgradable   * know their current and future package numbers   * have the changes (ChangeLog) for all of them between current/future version numbers   * without actually upgrading anything As a plus, I'd get this information without super user rights. When I do `aptitude update && aptitude upgrade` I only see the packages; when I've installed `apt-listchanges` I only see them once I commited to installed them (yes, I know I can abort it). Maybe I do not yet want to download all of the packages ( _could_ be a lot of them), which means I'd have to fetch the ChangeLog from somewhere else (but this is not a requirement; downloading them would fit too, but would require super user rights). **Update** A deleted answers mentioned to take a look at `apt-listchanges`. Despite sounding redundant given my question, it's true that I didn't realize I can use `apt-listchanges` alone. The man page mentions the option `\--apt` but I fail to understand which _pipeline_ I need to construct (and if it meets my goals). **Update 2** I figured that with `apt-show-versions` I get a nice output; it's just that the ChangeLog is missing:               $ apt-show-versions -u     apache2/squeeze upgradeable from 2.2.16-6+squeeze1 to 2.2.16-6+squeeze2     apache2-mpm-worker/squeeze upgradeable from 2.2.16-6+squeeze1 to 2.2.16-6+squeeze2     apache2-utils/squeeze upgradeable from 2.2.16-6+squeeze1 to 2.2.16-6+squeeze2     apache2.2-bin/squeeze upgradeable from 2.2.16-6+squeeze1 to 2.2.16-6+squeeze2     apache2.2-common/squeeze upgradeable from 2.2.16-6+squeeze1 to 2.2.16-6+squeeze2


What Linux tool will tell me if all the mounted disks share roughly the same bandwidth? Can I do something like iostat for each of my /dev/sd* devices?


title: performance on Linux system when daisy-chaining multiple USB hard-drives on USB hubs?

text: What would the I/O access be like as I plug many USB drives into a Linux system with only 2 USB 2.0 ports and 1 USB 3.0 port? I expect I will have to have multiple levels of fan-out by plugging hubs into hubs to maximize the number of devices on each USB port.


title: Debian PPC on PowerMac G5 boots to blank screen

text: As a side project, I thought I'd try to throw Debian (squeeze) on an old G5 PowerMac. It installed just fine, but after the bootloader and kernel boot-up output, the screen goes blank. Looks like a video mode problem or something, but I can't find where to change it. X isn't installed, so it should be booting to a login prompt. Any ideas? **Edit:** I'm having the same exact issue and what I've been doing after it going blank has been to look into `/var/log/messages` from the `rescue64` system on the installation CD. And indeed it turns out that the lines I see briefly before the screen flickers and goes blank went into the log. They are (I had to type it, because I didn't manage to get this off the machine from the rescue system):               [drm] Initialized drm 1.1.0 20060810     [drm] nouveau 0000:f0:10.0: Detected an NV30 generation card (0x034100b1)     [drm] nouveau 0000:f0:10.0: OF bios successfully copied (2403 bytes)     [drm] nouveau 0000:f0:10.0: Attempting to load BIOS image from PROM     [drm] nouveau 0000:f0:10.0: ... BIOS checksum invalid     [drm] nouveau 0000:f0:10.0: Attempting to load BIOS image from PRAMIN     [drm] nouveau 0000:f0:10.0: ... BIOS checksum invalid     [drm] nouveau 0000:f0:10.0: Attempting to load BIOS image from PCIROM     [drm] nouveau 0000:f0:10.0: ... BIOS signature not found     [drm] nouveau 0000:f0:10.0: Using BIOS image from PRAMIN     [drm] nouveau 0000:f0:10.0: BMP BIOS found     [drm] nouveau 0000:f0:10.0: BMP version 5.39     [drm] nouveau 0000:f0:10.0: Bios version 04.34.20.19     [drm] nouveau 0000:f0:10.0: Found Display COnfiguration Block version 2.2     [drm] nouveau 0000:f0:10.0: Raw DCB entry 0: 01100102 00000000     [drm] nouveau 0000:f0:10.0: Raw DCB entry 1: 01000100 000088b8     [drm] nouveau 0000:f0:10.0: Raw DCB entry 2: 02110212 11b00000     [drm] nouveau 0000:f0:10.0: Raw DCB entry 3: 02010210 11b088b8     [drm] nouveau 0000:f0:10.0: Raw DCB entry 4: 02010211 11b00003     [drm] nouveau 0000:f0:10.0: Parsing VBIOS init table 0 at offset 0x020A     [drm] nouveau 0000:f0:10.0: Parsing VBIOS init table 1 at offset 0x0457     [drm] nouveau 0000:f0:10.0: Parsing VBIOS init table 2 at offset 0x059D     [drm] nouveau 0000:f0:10.0: Parsing VBIOS init table 3 at offset 0x0723     [drm] nouveau 0000:f0:10.0: Parsing VBIOS init table 4 at offset 0x0740     [drm] nouveau 0000:f0:10.0: Parsing VBIOS init table 5 at offset 0x075D     [drm] nouveau 0000:f0:10.0: Parsing VBIOS init table 6 at offset 0x08E2     [TTM] ZOne  kernel: Available graphics memory: 609784 kiB.     [drm] nouveau 0000:f0:10.0: 64 BiB VRAM     [drm] nouveau 0000:f0:10.0: 64 MiB GART (aperture)     [drm] nouveau 0000:f0:10.0: Allocating FIFO number 0     [drm] nouveau 0000:f0:10.0: nouveau_channel_alloc: initialised FIFO 0     [drm] nouveau 0000:f0:10.0: Initial CRTC_OWNER is 0     [drm] nouveau 0000:f0:10.0: Detected a DVI-I connector     [drm] nouveau 0000:f0:10.0: Detected a DVI-I connector     [drm] nouveau 0000:f0:10.0: Detected a TV connector     [drm] nouveau 0000:f0:10.0: Setting dpms mode 3 on tmds encoder (output 0)     [drm] nouveau 0000:f0:10.0: Setting dpms mode 3 on vga encoder (output 1)     [drm] nouveau 0000:f0:10.0: Setting dpms mode 3 on tmds encoder (output 2)     [drm] nouveau 0000:f0:10.0: Setting dpms mode 3 on vga encoder (output 3)     [drm] nouveau 0000:f0:10.0: Setting dpms mode 3 on TV encoder (output 4)     composite sync not supported     windfarm: SMU failed new fan command falling back to old method     [drm] nouveau 0000:f0:10.0: Load detected on output B     [drm] nouveau 0000:f0:10.0: allocated 720x576 fb: 0x49000, bo c00000004945e000     Console: switching to colour dummy device 80x25     Trying to free nonexistent resource <0000000098004000-000000009807bfff>     Console: switching to colour frame buffer device 90x36     [drm] nouveau 0000:f0:10.0: Setting dpmc mode 0 on TV encoder (output 4)     [drm] nouveau 0000:f0:10.0: Output TV-1 is running on CRTC 1 using output B     fb0: nouveaufb frame buffer device     registered panic notifier     [drm] Initialized nouveau 0.0.15 20090420 for 0000:f0:10.0 on minor 0      Please note: `nosplash video=ofonly fb=false` has been appended to the kernel command line and that does _not_ help. Also, these parameters were added by default (the installer did that). Also note: changing it to `nosplash fb=false` doesn't change a thing. One more thing: the the `rescue64` environment from the installer CD works perfectly fine. It also seems to switch resolutions (or perhaps just the fonts?) but doesn't end up with a blank screen ...


title: A Live Linux Distro which is as small as possible (no X, no networking, bash)

text: I've been trying to find a Linux distribution to fit my needs but I need something that seems to be more minimal then "minimal" distributions (Eg: Microcore Linux) seem to provide. I don't need X, I don't need networking, I need something that can launch a bash script, which runs a modified version of dc3dd, which talks to a serial device and outputs information to a user via the normal console and nothing else. It'll be booted from read only media (Probably a disc but could also be write protected SD card) and will run on x86 platforms. It'll need to access SATA/IDE hard drives. I don't have any memory limitations but anything that isn't being used needs to be gone. Can anyone point me in the right direction or perhaps to a tool which can build something I am looking for? I'm hoping to spend as little time as possible on altering an existing distribution so I can focus on the application itself.


title: Mounting a partclone image

text: I'm having a really strange issue. I have backups of my machine in a local RAID array. They were created by Clonezilla, so I've created an actual filesystem image like so:               cat 2013-11-29/sda3.btrfs-ptcl-img.gz.* | gzip -d -c | \         partclone.restore -C -s - -O 2013-11-29.sda3.img      This has created a nice big image file in the current directory. However, when I go to mount it, I've noticed that it doesn't actually mount the image file; it simply creates a loop to `/`:               $ sudo mount 2013-11-29.sda3.img /mnt      To test this, I've created a simple file that shouldn't exist in the backup.               $ ls /home/naftuli | grep "newfile"     $ ls /mnt/home/naftuli | grep "newfile"     $ touch ~/newfile      I would expect that now, `/home/naftuli/newfile` exists, but `/mnt/home/naftuli/newfile` does _not_ exist. However, it is apparent that the mount is looping to `/`, as the `newfile` exists in _both_ places:               $ ls /home/naftuli | grep "newfile"     newfile     $ ls /mnt/home/naftuli | grep "newfile"     newfile      How can I force `mount` to mount the image file and specifically not loop to `/`?


title: Need advice to install Unix-like OS on my Laptop

text: I'm a CS undergraduate, and I'm a newbie to the Unix-like OSs. We used Fedora in our labs, but I've not mastered it. I've installed Windows 7 on my laptop and I want to install this Unix-based OS. These are my laptop capabilities:   * Processor : Intel i3   * Memory : 4GB DDR3   * Storage : 320GB I think other details are not needed. Are those capabilities is enough? If so, which distribution should I use?


title: A Linux Distribution under 8MB RAM?

text: I have recently acquired for free a laptop from 1995. I haven't tried turning it on yet, (no power cord, should have one soon though), but I noticed that it has 8mb of RAM in it, and I currently have no way to know what size the hard drive is. On top of this, the only way to add any software to this is via a floppy disk drive. I have no idea what type of architecture this build has, as I cannot find any resource on this brand of laptop (swan?). Is there a version of Linux that would run on this machine?


title: Add a user for Postgres on Mac

text: I've had a very difficult time trying to set up a postgres database. I am using Mac OS X 10.9.2. I am using this tutorial: http://tutorials.jumpstartlab.com/topics/environment/environment.html The Postgres section can be found 2/3 of the way down the page. After installing Homebrew and commanding `brew install postgresql` we create a database by:               sudo mkdir -p /usr/local/pgsql/data     sudo chown postgres:postgres /usr/local/pgsql/data     sudo su postgres     initdb -D /usr/local/pgsql/data     createuser `whoami`      When I do               sudo chown postgres:postgres /usr/local/pgsql/data      it returns the error               chown: postgres: illegal user name      I can't seem to find a simple command to add a user - adduser and useradd have returned "command not found", with and without sudo. I am not sure what the problem is. Is there a simple command I can do?


title: Find the top 50 directories containing the most files/directories in their first level?

text: How can I use `find` to generate a list of directories which contain the most numbers of files. I'd like the list to be from highest to lowest. I'd only like the listing to go 1 level deep, and I'd typically run this command from the top of my filesystem, i.e. `/`.


title: search and replace string

text: I have a XML tag for example               <tag name="abc"></tag>      I wanted to replace the string inside "" with the tag name i.e the upper XML tag should be become now               <abc name="abc"></abc>


title: How to get the output inside `screen` out to a script?

text: I have a `screen` instance running (a lot more actually, but only one that matters), and I would need to execute some code inside the `screen`, and get the result out to my script. The first part is quite easy, I just `screen -S session_name -X eval 'stuff "$cmd"\015'`.   (I'm no `screen` expert, I just modified a line I found in a script, but I understand it... Not sure there's no better way to do it, though) The second part, getting out the output, is trickier. For my current need, I only need the last line, but it'd be better if I can get the whole output, whatever it's size _(for future uses)_.


title: Virtual always connected network interface with static IP?

text: How do I create a virtual, always connected network interface with a static IP on Linux? It must work when all my physical interfaces are disconnected. Looking for general information regarding this, can be for any distribution (Debian, CentOS, Arch Linux etc.)


title: How to block outgoing connections from process/user on FreeBSD?

text: My server executes third party software which processes user submitted files. I want to block outgoing connections from my process. How can I do it in FreeBSD?


title: How do i open all files that are the result of a ls command?

text: I'd like to open all text files that are the result of a ls command using a text editor. How do i do this?


title: Script to monitor folder for new files?

text: How do I detect new files in a folder with a bash script? I would like to process the files as soon as they are created in the folder. Is this possible to do so or do I have to schedule a script with cron that that check for new files each minute or so?


title: Is there a way to cat files as they are created?

text: Unlike the answer to this question (Can a bash script be hooked to a file?) I want to be able to see content of files that haven't been created yet **as or after they are created**. I don't know when they will be created or what they will be named. That solution is for a specific file and actually mentions in the question title creating a "hook" to a specific file. My question is different because I don't want to hook anything, and what I do want is not specific to a particular file. My question's title specifies "..as they are created" which should be a clue that the files I am interested in do not exist yet. I have an application that users use to submit information from a website. My code creates output files when the user is finished. I want to be able to see the content of these files as they are created, similar to the way `tail -f` works, but I don't know ahead of time what the filenames will be. Is there a way to cat files as they are created or would I have to somehow create an endless loop that uses `find` with the `-newermt` flag Something like this is the best I can come up with so far:               #!/bin/bash     # news.sh          while true     do       d=$(date +"%T Today")       sleep 10       find . -newermt "$d" -exec head {} +     done      For clarification, I don't necessarily need to tail the files. Once they are created and closed, they will not be re-opened. Existing files will never change and get a new modification time, and so I am not interested in them.


title: full disk encryption (including swap, possibly plausible deniability as well)

text: I'm looking for a method to encrypt my laptop including the swap partition. I also read trough older similar questions but mostly the answer included just a **_what_** not much of a **_how_**. (Currently I'm working on a 128GB SSD & Debian Jessie) My aim is to have   * a state of the art encryption   * fully encrypted disk (including swap)   * a single password on boot for decryption   * automatic encryption on hibernate/suspend nice to have would also be a second password to boot to a second valid OS for plausible deniability.


title: What is the GNOME Classic Monospace font?

text: I am moving to Cinnamon from GNOME Classic. I would like to bring the terminal font from GNOME. In Cinnamon the fixed width system font is also called Monospace but it looks different. Is there another name for the GNOME default terminal font?


title: FileZilla: Failed to retrieve directory listing

text: I am running Ubuntu 12.04 as the host and installed Ubuntu 14.04 in the Virtualbox as Guest OS.   I have installed and configured VSFTPD on Ubuntu 14.04 and forwarded the virtualbox port's as follows: ![enter image description here](http://i.stack.imgur.com/D5Q1C.png) Now i am using FileZilla in my host OS in order to access into the guest OS.   Here is the FileZilla login detail:   **Host:** 127.0.0.1   **Username:** hasan   **Password:** ***********   **Port:** 8181   Now i press the **Quickconnect** button to access into the guest os.   Login was success but filezilla was unable to access into the guest os!.   Here is the messages:                 Status: Connecting to 127.0.0.1:8181...     Status: Connection established, waiting for welcome message...     Response:   220 (vsFTPd 3.0.2)     Command:    USER hasan     Response:   331 Please specify the password.     Command:    PASS ******     Response:   230 Login successful.     Command:    OPTS UTF8 ON     Response:   200 Always in UTF8 mode.     Status: Connected     Status: Retrieving directory listing...     Command:    PWD     Response:   257 "/home/hasan"     Command:    TYPE I     Response:   200 Switching to Binary mode.     Command:    PASV     Response:   227 Entering Passive Mode (10,0,2,15,224,245).     Command:    LIST     Error:  Connection timed out     Error:  Failed to retrieve directory listing      I was unable to fix this. Any idea?


title: What does redirection with >| do?

text: When should you use `>|` for redirecting output to a file instead of just `>`? The explanation given when I was shown this was that it guaranteed the target file was truncated first. But I thought `>` already implied that. Is `>|` useful?


title: Extract a part of one line from a file with sed

text: I want to read one part of one line from a file. For example: > POP3_SERVER_NAME = localhost I want to return only `localhost`, using sed. This text is on the third line. I do this to extract the line:               sed -n '3p' installation.sh      How do I extract only the `localhost` part?


title: Reverse dns using dns server of domain

text: I need to check a reverse dns using the DNS servers of some domains. But I'm having some problems.               dig -x 212.26.146.21 +short     mx20.gypost.com.      all ok               dig -x 212.26.146.21 @8.8.8.8 +short     mx20.gypost.com.      its ok too               dig SOA google.com +short      ns1.google.com. dns-admin.google.com. 2014021800 7200 1800 1209600 300          dig -x 212.26.146.21 @ns1.google.com +short      empty I can't find reverse address using NS record of any domain. What i do wrong? And how i can check my reverse address using dns server of gmx.com, for example.


title: How can I execute `date` inside of a cron tab job?

text: I want to create a log file for a cron script that has the current hour in the log file name. This is the command I tried to use:               0 * * * * echo hello >> ~/cron-logs/hourly/test`date "+%d"`.log      Unfortunately I get this message when that runs:               /bin/sh: -c: line 0: unexpected EOF while looking for matching ``'     /bin/sh: -c: line 1: syntax error: unexpected end of file      I have tried escaping the `date` part in various ways, but without much luck. Is it possible to make this happen in-line in a crontab file or do I need to create a shell script to do this?


title: Mplayer cronjob doesn't work

text: > **Possible Duplicate:**   >  How can I execute `date` inside of a cron tab job? I made a cronjob to record a stream every friday between 23pm and midnight. Only somehow this doesn't seem to work. the cronjob is               57 22 * * 5 timeout -s SIGINT 66m mplayer -dumpstream http://82.201.100.23:80/slamfm -dumpfile /var/www/HOA-NL/$(date +"%U-%Y").mp3 >> /home/david/HOA-NL-LOG 2>&1      This doesn't work while the following works               57 22 * * 5 echo "foo" > /home/david/barr      and the following works either (timing out echo doesn't make sense, I know. It's just an example)               57 22 * * 5 timeout -s SIGINT 66m echo "foo" > /home/david/barr      Now I'm wondering why this doesn't work.. It doesn't give me a error or a message in /home/david/HOA-NL-LOG


title: cron logging but not working on some commands

text: > **Possible Duplicate:**   >  How can I execute `date` inside of a cron tab job? I have a server in Amazon EC2 that I run a backup script on with cron. However, it is not working. To test out if cron is working, I did the following: Logged into the server and switched to root. I then ran "crontab -e". It has the following lines:               SHELL=/bin/bash     PATH=/sbin:/bin:/usr/sbin:/usr/bin     MAILTO=root     HOME=/          29 00 * * thu tar -zcvf /home/<user removed>/Dropbox/Backup/DirBackup_$(date +%Y%m%d).tar.gz /var/www/html/     30 00 * * thu mysqldump -u <removed> -h <removed> -p<removed> --opt <removed> > /home/<user removed>/Dropbox/Backup/database-backup-$(date +%Y%m%d).sql     */1 * * * * touch /tmp/foo      So, the touch command should go every minute, and the others should run at 00:29 and 00:30 on Thursday. Here is what the logs say:               Sep 20 00:27:01 ip-10-204-142-149 CROND[16888]: (root) CMD (touch /tmp/foo)     Sep 20 00:28:01 ip-10-204-142-149 CROND[16890]: (root) CMD (touch /tmp/foo)     Sep 20 00:29:01 ip-10-204-142-149 CROND[16898]: (root) CMD (tar -zcvf /home/<user removed>/Dropbox/Backup/DirBackup_$(date +)     Sep 20 00:29:01 ip-10-204-142-149 CROND[16900]: (root) CMD (touch /tmp/foo)     Sep 20 00:30:01 ip-10-204-142-149 CROND[16913]: (root) CMD (mysqldump -u <removed> -h <removed> -p<removed> --opt <removed> > /home/<user removed>/Dropbox/Backup/database-backup-$(date +)      If I check the time stamps on the /tmp/foo folder, they are changing every minute. If I check Dropbox, the files are not there. (I am using "ls /home//Dropbox/Backup/" to check this to verify that it is not a Dropbox upload problem) They should be! I tested that by copy/pasting the command from cron onto the command line....it works great! Does anybody know why cron would be logging the commands but they are not actually working?


title: Help with "crontab -e"

text: I'm trying to learn a little about `cron` and would appreciate some help. I edited `crontab -e` to have this line:                */10 * * * * /usr/bin/touch /home/dkb/Desktop/test.txt      It works and I see `test.txt` changing its "Date Modified" value every ten min in Thunar and there are corresponding entries in `/var/log/syslog`:               Mar 13 10:50:01 dkb-lappy CRON[3978]: (dkb) CMD (/usr/bin/touch /home/dkb/Desktop/test.txt)     Mar 13 11:00:01 dkb-lappy CRON[4066]: (dkb) CMD (/usr/bin/touch /home/dkb/Desktop/test.txt)     Mar 13 11:10:01 dkb-lappy CRON[4099]: (dkb) CMD (/usr/bin/touch /home/dkb/Desktop/test.txt)      But, if I use               */10 * * * * /usr/bin/touch /home/dkb/Desktop/$(date +%H:%M:%S).txt        **no** file is created at all in ~/Desktop and `syslog` has this:               Mar 13 11:30:01 dkb-lappy CRON[4241]: (dkb) CMD (/usr/bin/touch /home/dkb/Desktop/$(date +)     Mar 13 11:30:01 dkb-lappy CRON[4240]: (CRON) info (No MTA installed, discarding output)     Mar 13 11:40:01 dkb-lappy CRON[4251]: (dkb) CMD (/usr/bin/touch /home/dkb/Desktop/$(date +)     Mar 13 11:40:01 dkb-lappy CRON[4250]: (CRON) info (No MTA installed, discarding output)      I checked that `/usr/bin/touch /home/dkb/Desktop/$(date +%H:%M:%S).txt` works properly in the terminal. So what am I doing wrong?


title: How to find out why my cron didn't run?

text: This is the content of root's crontab:               0       23      *       *       0-4     /usr/sbin/rtcwake -time `date --date="+16 hours" +"%s"` -m mem      This is set to fire off that command every Sun-Thu at 11pm. The command is essentially a suspend for the next 16 hours while I'm at work to save power. I've test the command with smaller times (30, 60 seconds) and it works. However, when I wake up in the morning and check my machine, it's still running. Here's what's in the logs:               Jul 24 23:00:01 gallactica CRON[5033]: (root) CMD (/usr/sbin/rtcwake -time `date --date="+16 hours" +")      So does this mean it ran? Why didn't it actually work?


title: pcregrep newline lookbehind assertion bug?

text: Attempting to use `pcregrep` to print the first line after a blank line. For example, contents of file               first line          second line      I need `second line` to be printed. Here are a few tests using the same regular expression throughout With Python 2.7               python -c "import re; print re.search(r'(?<=\n\n).*?$',\         open('file').read(), re.MULTILINE).group()"     second line      With GNU grep 2.16               grep -oPz  '(?<=\n\n).*?$' file     second line      With pcregrep version 8.12               pcregrep -Mo  '(?<=\n\n).*?$' file     (no output)      Based on a few tests, `pcregrep` supports lookbehind assertions in general but does not seem to be able to deal with `\n` within lookbehind assertions in particular. `\n` within lookahead assertions presents no problem. Tested on RHEL as well as Ubuntu. Any ideas?


title: sharing or synchronizing history between Zsh and Bash

text: I often find myself switching between Bash and Zsh, and using the history search functionality to recover a command. However, since Bash and Zsh have different history files, I often find that the command I'm searching for has been executed in the other shell. Is there any way to share or synchronize history between the two?


title: Where to get 32-bit Oracle-XE 11g binaries?

text: Oracle website offers 64-bit RPMs for its 11g versions. Do they offer 32-bit somewhere or does someone else do? Are there Debian binaries available?


title: Print Column if values is between two other values

text: I am fairly new to data analysis and I have a problem with filtering some of my values. I have data arranged in a file with four columns like this:                 A   1       10     5     B   10      100    120     C   100     1000   1200      D   1000    10000     E   10000   100000     F   100000  1000000     G   1000000 10000000      What I want to do now is to print only lines where the values in column 4 are in between the values in columns 2 and 3. So something like this:               A 1 10      C 100 1000     D 1000 10000      I tried with grep and awk, e.g. `awk '$4 >= $2 && $4 <= $3 {print $1,2,3}'`. Though the problem is that awk searches only within the same line and not for all lines where it matches this criteria. I guess it's rather simple but I couldn't figure out how to do it.


title: What is this complex line of code doing?

text: I am trying to understand this line from a shell script. I know that `$(..)` means run the `..` and insert its output where you find `$()` in a statement. But what is going on between those parenthesis? What is the `\ls` doing and how does that relate to the `\` on the prior lines? Is that a `\\\` split across two lines? Is `\ls` the same as regular `ls`?               APPCLASSPATH=$CLASSPATH:$({ \         \ls -1 "$VOLTDB_VOLTDB"/voltdb-*.jar; \         \ls -1 "$VOLTDB_LIB"/*.jar; \         \ls -1 "$VOLTDB_LIB"/extension/*.jar; \     } 2> /dev/null | paste -sd ':' - )      I'm a comparative linux noob trying to read some complex shell scripts so a little help would be great.


title: How do I filter a log to only the lines between two times?

text: I'm working in Unix. I'd like to fetch information from a log in a specified time range for the current date. For example I want the data from a log file of today's date from 00:00 to 09:00. Sample log entry:               13/10/16 14:45:02 <batchspeedchange> <BELLBD.BD77350A.G6987V00> <> FAILED FILE FORMAT VALIDATION - ERROR:-213:rawData cannot contain tokens      How do I get the output from such a log file?


title: Private vlan concept (rfc 5517)

text: I'm learing vlan concept and came around private vlan rfc. I think that i understand the reason and implication of isolated domain, but i'm not sure that i understand the community domain. Particularly i don't understand the difference between regular vlan and private vlan (community domain).   I'm not a system administrator, but for correct implementation it is important for me to understand how it used in real network.   Thanks for any input, Ilya. P.S the question is very simalary to this one, but a bit more theoretical although i will be glad to see practical example how to configure isolated vlan on linux.


title: Are there any audited webbrowsers in OpenBSD?

text: I'm looking for an audited web browser on OpenBSD. As far as I can tell nothing in Ports is audited, so are there any browsers built-in on OpenBSD?


title: Are there any keepassx like solutions for OpenBSD?

text: Are there any password protecting solutions under OpenBSD, that is not from Ports?


title: With SSH X11 forwarding (`ssh -X`), get `Can't open display` trying to run X applications

text: I'm able to login to sever using               ssh -X Hostip      but when i run the command xclock it give me this error               Error: Can't open display: localhost:11.0      I check my Display value using               echo $DISPLAY      and the result is               localhost:11.0      And X11 forwarding is set to YES in sshd_config file               X11Forwarding yes     X11DisplayOffset 10     X11UseLocalhost yes      Any advice what I'm missing here?


title: How to strip a Linux system?

text: I've been building a Linux distro, and I've stripped the binaries, etc. The system won't use GCC or development tools, as it will be a Chrome kiosk, so it would greatly help if I could strip down the system... I was wondering, is there a way that I can delete all of the unused system files (like binaries, etc.) by watching what files/libraries are used during runtime? Maybe another method is preferred, but is there a way to accomplish something like this?


title: Where are the logs for the serial port (power save modes, specifically)

text: I'm running a system with Ubuntu 10.10 (pretty old, I know, but it has to be that one), with all its packages updated to the latest version supported (the distribution is not supported anymore so, to say so, " _I've got the lastest Ubuntu 10.10 available_ ") I have a very strange issue with a USB Modem: After a few hours (I would say 5 or 6) or working properly, it stops working. Silently. I have a program, written in Python that listens and sends commands to said modem using "`pyserial`" (I believe it's `pyserial` version 2.3 for what I read in `/usr/share/pyshared/serial/__init__.py`) Everything works fine for some hours but then the modem stops sending/receving things. It doesn't throw an error, it doesn't say anything is wrong... it just stops working. I have no clue of what may be going on so my only guess at this point is something related to the ACPI or some kind of power saver mode kicking in. I've tried to disable anything that could remotely sound to "power saving" but still fails. Is there any way of knowing what is going on with my USB / serial port in the logs? I've checked `/var/log/pm_powersave.log`, `syslog`, `dmseg` but I don't really know what am I looking for (or where for that matter). Any idea will be appreciated. Thank you in advance.


title: How can I force LXDE to have a transparent background when connecting with X/X11?

text: ![raspberry-pi-7 1.jpg](http://img823.imageshack.us/img823/2756/raspberrypi71.jpg) Just got my Raspberry Pi in the mail and I've started playing around with it. After getting LXDE up and working working in desktop mode (i.e. monitor and keyboard plugged in) I decided I wanted to connect to it remotely. I know I can use a VNC/RDP client but maybe for now just connecting with `XForwarding` and launching `lxsession` would be fine. To describe my environment, I'm using OS X I had previously installed `XQuartz.app` to replace the native X11 app (because it boasted more features and benefits for using X applications). The first time I connected as `root` via `ssh` to the remote machine and launched `lxsession` it gave me the behavior that I am seeing to have again - I kept my Mac OS X desktop background and it simply overlaid the LDE menu at the bottom of the screen - sort of a transparent desktop: ![Screen shot 2012-07-18 at copy.png](http://img715.imageshack.us/img715/8825/screenshot20120718atcop.png) However now when most of the time when I do these steps again it not have a transparent desktop - it will in fact show the LXDE background: ![Picture copy 3.png](http://img802.imageshack.us/img802/2797/picturecopy3.png) Is there an option I'm missing to be able to be able to achieve the "transparency" or "integrated" version? I looked in the LXDE Desktop Preferences and didn't see an option to disable it: ![Picture 1.png](http://img694.imageshack.us/img694/980/picture1brt.png) I have tried setting the desktop image to a transparent gif file which will remove the picture, but then I didn't see any way to remove the desktop background color - because after I select the transparent file I am just getting a solid color. How can I achieve the "transparency" or "integrated" version of LXDE via X forwarding from OS X?


title: How do I boot Linux if boot partition was deleted?

text: At first, Windows 7 was the only OS in the drive. Then I installed MINT. Accidentally, I formated the `sda1` partition (where the windows 7 bootloader was stored) as ext4, being the mount point of `/boot`. So then I couldn't boot Win7 anymore. (By the way, MINT was installed in the sda5 partition) Afterwards, I repaired the Win7 bootloader succesfully, which deleted GRUB(2?) loader, thus being unable to boot Mint. I tried running:               sudo mount /dev/sda5 /mnt     sudo grub-install --root-directory=/mnt/ /dev/sda      Result message is:               grub-probe: error: cannot find a device for /boot (is /dev mounted?).     Installation finished. No error reported.      And after reboot, I get the `grub>` prompt, but no OS options whatsoever. (Keep in mind, there's no partition assigned for `/boot`)


title: Installing DRBD on Redhat 5

text: I am trying to install DRBD on Redhat 5. Everything i find is out of date, and all the files are not hosted anymore. From what I understand I need to install the Cent OS repositories to install DRBD on Redhat 5? Can anyone lead me in the right direction with this please? I appreciate it.


title: console displaying quote character from gcc wongly

text: After an upgrade to debian wheezy my text consoles displays questions marks where there should be quotes Under X I see things correctly               window.cpp:1056:21: error: base operand of ‘->’ is not a pointer      but the console shows               window.cpp:1056:21: error: base operand of ?->? is not a pointer      If I remove everything from that file except the quote and put xy around it (to spot it more easily), then emacs hexl-mode tells me it is this character                00000000: 78e2 8098 790a                           x...y.      I understand 78 (x), 79(y) and 0a (LF) but I have trouble to believe that something as simple as a quote requires three unicode bytes. I also tried               dpkg-reconfigure console-setup      and managed to produce more unreadable characters, but did not succeed to see the quotes correctly. I can type a single quote no problem and manpages and everything look okay, so I don't know whether gcc or the console is to blame.


title: Doesn't umask apply to files?

text: I have set the `umask` to `0`.   So:               $umask        0000        I do   `echo 'test' > test.txt`   And `test.txt` is created. If I do: `ls -l test.txt` I see:   $ls -l test.txt   `-rw-rw-rw- 1 jim None 5 Jun 30 22:50 test.txt`   Why aren't the rights `rwxrwxrwx`?


title: Openbox keybindings not taking effect after --reconfigure or restart

text: 273     <keybind key="W-Return">      274       <action name="Execute">      275         <command>lxterminal</command>      276       </action>      277     </keybind>      278     <keybind key="W-Up">      279       <action name="ToggleMaximizeFull"/>      280     </keybind>      281     <keybind key="W-Left">      282       <action name="MoveToEdgeWest"/>      283     </keybind>      284     <keybind key="W-Right">      285       <action name="MoveToEdgeEast"/>      286     </keybind>      I added these lines in between the default last `</keybind>` and `</keyboard>` in my `~/.config/openbox/rc.xml` file (the line numbers are from vim). However, neither restarting X nor issuing an `openbox --reconfigure` applies these settings. What am I doing wrong? I'm using Arch with all the default LXDE packages.


title: Tilde when clicking <Del> key

text: I am using XFCE Terminal emulator 0.4.8. My ~/.inputrc file:               # Insert Key     "\e[2~": paste-from-clipboard     "\C-v": paste-from-clipboard     "\e[A":history-search-backward     "\e[B":history-search-forward     "\M-[3~": delete-char      When I click `<Del>` a tilde is printed instead of deleting the next character. When I remove .inputrc file, it starts working correctly. Googling showed, that this line:               "\M-[3~": delete-char      has helped people to cure this. But not me. I inserted this line into .inputrc, even deleted all the other lines. Doesn't work. How to fix?


title: postfix + Cyrus SASL - cannot connect to saslauthd server: No such file

text: Everything is up and running and answer on calls but the login for postfix doesn't seem to work (it works for Courier IMAP, just not postfix). Here's the error output:               Jun 30 22:22:10 HOST postfix/smtps/smtpd[31676]: Anonymous TLS connection established from unknown[<my ip>]: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)     Jun 30 22:22:10 HOST postfix/smtps/smtpd[31676]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory     Jun 30 22:22:10 HOST postfix/smtps/smtpd[31676]: warning: SASL authentication failure: Password verification failed     Jun 30 22:22:10 HOST postfix/smtps/smtpd[31676]: warning: unknown[<my ip>]: SASL PLAIN authentication failed: generic failure         Here's `/usr/local/lib/sasl2/smtpd.conf`:               pwcheck_method: saslauthd     mech_list: PLAIN LOGIN     authdaemond_path: /var/run/courier-auth/socket     log_level: 7      And the socket has been created: `# ls -l /var/run/courier-auth/`               total 4     -rw-r--r--  1 root  wheel     5 Jun 30 22:19 pid     -rw-------  1 root  wheel     0 Jun 30 22:19 pid.lock     srwxrwxrwx  1 root  _postfix  0 Jun 30 22:19 socket      The `/etc/courier/authdaemonrc` says:               [...]     authmodulelist="authpwd"     [...]     authdaemonvar=/var/run/courier-auth     [...]      I have no clue why this is going wrong, or where to begin to check for errors since the log doesn't specify which file it's looking for or where the connection is going wrong so i'm in desperate need of some help here. # System:   * OpenBSD 5.3   * postfix-2.10.20130201-sasl2   * courier-authlib-0.64.0   * courier-imap-4.11.0 Note: increasing the log-level of postfix is of not use either, i'm doing the best i can to not annoy you with standard questions like this but i'm bashing my head hard at the moment! Edit: I've also taken into account that postfix runs in a chrooted environment (tried not chrooting as well just for the sake of it) and thus i created /storage/spool/postfix/var/run/courier-auth/ and placed `socket` in that folder without any success. Also tried `symlinking` that chroot folder to the actual folder `/var/run/courier-auth/` also without success. # Partial solution: Ok so i've fixed SMTP, postfix can now use SASL2, however.. That ment dropping the support for Couerier IMAP... Eh.. Aparently there was some missing startup parameters in saslauthdaemond via `/etc/rc.d/saslauthd`, i had a missing `mux` file which worried me since almost every guide except the OpenBSD guide pointed to it.. so i fixed that by adding:               daemon_flags="-a getpwent -m /var/run/courier-auth/"      The startup script had no flags for whatever reason.. so that fixed some issues. Now SMTP can authenticate, but now `imapd-ssl` says:               Jul  1 14:08:48 HOST imapd-ssl: LOGIN FAILED, method=PLAIN, ip=[::ffff:<ip v4>]     Jul  1 14:08:48 HOST imapd-ssl: authentication error: Connection refused     Jul  1 14:08:52 HOST imapd-ssl: authdaemon: s_connect() failed: Connection refused     Jul  1 14:08:52 HOST imapd-ssl: [Hint: perhaps authdaemond is not running?]      After actually starting up the daemon (....) i can now authenticate against SASL2 even with IMAP, however it just says wrong credentials.. # Further troubleshooting:               Jul  1 14:55:10 HOST imapd-ssl: LOGIN FAILED, method=PLAIN, ip=[::ffff:<ipv4>]     Jul  1 14:55:15 HOST imapd-ssl: LOGIN FAILED, user=MyUser, ip=[::ffff:<ipv4>]      The user is a local user and can login locally but even so the user shouldn't need a actual shell to login to the mail. so i poked around and found out that `DEFDOMAIN="@domain.se"` is messing things up, so i removed that from `/etc/courier/imapd` and i got to the point where `SMTP` work and i get this from the `IMAP`:               Jul  2 13:23:10 HOST authdaemond: Authenticated: sysusername=anton, sysuserid=<null>, sysgroupid=20001, homedir=/storage/vmail/anton, address=anton, fullname=Anton, maildir=<null>, quota=<null>, options=<null>     Jul  2 13:23:10 HOST authdaemond: Authenticated: clearpasswd=MyPasswd, passwd=$1b$04$QQQ1c10x0AU3etWCJFrla.Rl22sevNhq24yXYxrq8IN7mEeGI20.     Jul  2 13:23:10 HOST imapd-ssl: anton: Account's mailbox directory is not owned by the correct uid or gid      But i'm not sure why because:               # ls -l /storage/vmail/     -rw-r--r--  1 vmail  vmail   22 Mar 13 01:06 .Xdefaults     -rw-r--r--  1 vmail  vmail  773 Mar 13 01:06 .cshrc     -rw-r--r--  1 vmail  vmail  398 Mar 13 01:06 .login     -rw-r--r--  1 vmail  vmail  113 Mar 13 01:06 .mailrc     -rw-r--r--  1 vmail  vmail  218 Mar 13 01:06 .profile     drwx------  2 vmail  vmail  512 Jun 30 10:44 .ssh     drwxr-xr-x  3 anton  anton  512 Jun 30 10:44 anton


title: journalctl --verify reports corruption

text: I just noticed this `verify` option for `journalctl` and decided to give it a go, it's showing corruption, what might cause that? and what if anything should I do about it? should I investigate further?               journalctl --verify     PASS: /var/log/journal/19184893a1d645c7a43729e79b10a876/user-1000.journal     Invalid object contents at 3733856░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   0%     File corruption detected at /var/log/journal/19184893a1d645c7a43729e79b10a876/system.journal:3733856 (of 91734016, 4%).     FAIL: /var/log/journal/19184893a1d645c7a43729e79b10a876/system.journal (Bad message)     Invalid object contents at 21575496░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  45%     File corruption detected at /var/log/journal/19184893a1d645c7a43729e79b10a876/system@60e058db556e4de4b256d0b1ff176aa4-0000000000000001-0004e0b436d20aa1.journal:21575496 (of 44052480, 48%).     FAIL: /var/log/journal/19184893a1d645c7a43729e79b10a876/system@60e058db556e4de4b256d0b1ff176aa4-0000000000000001-0004e0b436d20aa1.journal (Bad message)     PASS: /var/log/journal/19184893a1d645c7a43729e79b10a876/user-1000@60e058db556e4de4b256d0b1ff176aa4-0000000000000a91-0004e0b4ff9a949a.journal     PASS: /var/log/journal/19184893a1d645c7a43729e79b10a876/user-1001.journal


title: printing colored text using echo

text: I know that for printing a colored text using echo, for example red color, the code is: `echo -e "\e[1;31m This is red text \e[0m"`   and I know that in this example, 31 is code of red color and the number of other colors is:               Black       0;30     Dark Gray     1;30     Blue        0;34     Light Blue    1;34     Green       0;32     Light Green   1;32     Cyan        0;36     Light Cyan    1;36     Red         0;31     Light Red     1;31     Purple      0;35     Light Purple  1;35     Brown       0;33     Yellow        1;33     Light Gray  0;37     White         1;37      and for background colors, the num is 40 to 47 my Question is this: what does `\e` and `[` and `m`(after 31) exactly mean here?   I read in the man page that \e is escape, but I didn't understand what it means.


title: Load balanced & Redundant Storage on FreeBSD

text: Did Google for this the last week, still can't find any reasonable solutions for FreeBSD. Most of the articles contain solutions for a fail-over storage only (FreeBSD HAST). This is NOT what I'm looking for. I need a NAS which will be load-balanced and redundant at the same time + accessible for the FreeBSD APP servers as a regular directory (NFS?). My question is NOT related to Web-server or Firewall load-balancing. All I'm concerned about is STORAGE. Please point me in the right direction for the research. **EDIT: Please don't post CARP IP-packet balancing solutions, this is not what I'm looking for.** ![enter image description here](http://i.stack.imgur.com/8ordO.png)


title: What is the difference between the various tiling modes in KWin, and how do I use them?

text: There are 3 tiling modes in KDE: spiral, columns and floating. What does each do and how do make them work for me? For example, spiral seems to cut my screen in half then the next half another way. Is it possible to adjust it so that it's like 2/3? I don't understand how to make use of float. Perhaps someone could explain what each is for (or one for each answer) and how they can be used and tuned. ![System Settings, Window Behavior, Window Behavior, Advanced, showing tiling settings](http://i.stack.imgur.com/HFZo9.png)


title: How to interpret the following pattern of uptime data?

text: I have a small web server running mysql and wordpress which after a while appears to stop processing web requests. I can't even log into the server via ssh as ssh client times out when trying to establish the connection, with the only way to bring back the server is to do a hard reboot. I left `ssh` running with `top` over a period of 10 hours to watch this server slowly die, and when it got to the point where there it appear stuck top was still working. I was able to quit `top` shut down `mysql` and `httpd` then repeatedly typed `uptime` and the load average went from `101.73` to `0.01` in the span of 10 minutes after shutting down `httpd` and `mysqld`. I have provided data I was able to collect below. **My Questions:**   * what is the meaning of the data?    * Is this machine out of CPU or RAM?   * Would a bigger box solve the problem?   * What other tools can be used to identify the cause of this problem. **Here is a snapshot of`top` just before I quit it and shutdown `httpd` and `mysqld`**               top - 11:00:18 up 13:54,  1 user,  load average: 96.13, 94.78, 90.06     Tasks: 173 total,   1 running, 172 sleeping,   0 stopped,   0 zombie     Cpu(s):  0.5%us,  1.1%sy,  0.0%ni,  0.0%id, 98.4%wa,  0.0%hi,  0.0%si,  0.0%st     Mem:   1016284k total,  1008232k used,     8052k free,      580k buffers     Swap:  2096440k total,  2095168k used,     1272k free,     9872k cached           PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                7 root      20   0     0    0    0 S  0.2  0.0   0:09.98 events/0                                                                                18 root      20   0     0    0    0 S  0.1  0.0   0:11.66 kblockd/0                                                                                1267 root      20   0  114m  316  232 S  0.1  0.0   0:00.41 crond                    4779 apache    20   0  270m  11m  548 D  0.1  1.2   0:00.68 httpd                                                                                4878 apache    20   0  261m  17m  896 D  0.1  1.8   0:00.44 httpd                                                                                5046 apache    20   0  272m  19m 1168 D  0.1  1.9   0:00.69 httpd                                                                                5258 apache    20   0  244m 2552 1300 D  0.1  0.3   0:00.01 httpd        ...... stuff I have removed to make this list short       1532 root      20   0  105m    4    4 S  0.0  0.0   0:00.01 mysqld_safe                                                                                1634 mysql     20   0  713m 8656 1612 S  0.0  0.9   1:13.79 mysqld                                                                                1805 root      20   0  244m  976   80 S  0.0  0.1   0:03.43 httpd          **Data from the`uptime` command**                11:01:50 up 13:55,  1 user,  load average: 99.15, 95.94, 90.88      11:05:19 up 13:59,  2 users,  load average: 101.73, 97.93, 92.65      11:05:45 up 13:59,  2 users,  load average: 67.02, 90.07, 90.18      11:07:27 up 14:01,  2 users,  load average: 11.61, 63.36, 80.53      11:07:30 up 14:01,  2 users,  load average: 11.61, 63.36, 80.53      11:07:35 up 14:01,  2 users,  load average: 10.68, 62.31, 80.10      11:07:39 up 14:01,  2 users,  load average: 9.83, 61.28, 79.67      11:07:41 up 14:01,  2 users,  load average: 9.04, 60.26, 79.24      11:07:43 up 14:01,  2 users,  load average: 9.04, 60.26, 79.24      11:07:48 up 14:01,  2 users,  load average: 8.31, 59.26, 78.82      11:07:50 up 14:01,  2 users,  load average: 8.31, 59.26, 78.82      11:07:52 up 14:01,  2 users,  load average: 7.65, 58.28, 78.39      11:07:54 up 14:01,  2 users,  load average: 7.65, 58.28, 78.39      11:07:56 up 14:01,  2 users,  load average: 7.65, 58.28, 78.39      11:07:57 up 14:02,  2 users,  load average: 7.04, 57.31, 77.97      11:07:58 up 14:02,  2 users,  load average: 7.04, 57.31, 77.97      11:08:04 up 14:02,  2 users,  load average: 6.47, 56.36, 77.55      11:08:05 up 14:02,  2 users,  load average: 6.47, 56.36, 77.55      11:08:06 up 14:02,  2 users,  load average: 5.95, 55.42, 77.14      11:08:08 up 14:02,  2 users,  load average: 5.95, 55.42, 77.14      11:08:09 up 14:02,  2 users,  load average: 5.95, 55.42, 77.14      11:08:10 up 14:02,  2 users,  load average: 5.95, 55.42, 77.14      11:08:11 up 14:02,  2 users,  load average: 5.48, 54.50, 76.72      11:08:12 up 14:02,  2 users,  load average: 5.48, 54.50, 76.72      11:08:14 up 14:02,  2 users,  load average: 5.48, 54.50, 76.72      11:08:15 up 14:02,  2 users,  load average: 5.48, 54.50, 76.72      11:08:16 up 14:02,  2 users,  load average: 5.04, 53.60, 76.31      11:08:17 up 14:02,  2 users,  load average: 5.04, 53.60, 76.31      11:08:19 up 14:02,  2 users,  load average: 5.04, 53.60, 76.31      11:08:20 up 14:02,  2 users,  load average: 5.04, 53.60, 76.31      11:08:22 up 14:02,  2 users,  load average: 4.63, 52.70, 75.90      11:08:23 up 14:02,  2 users,  load average: 4.63, 52.70, 75.90      11:08:25 up 14:02,  2 users,  load average: 4.63, 52.70, 75.90      11:08:26 up 14:02,  2 users,  load average: 4.26, 51.83, 75.49      11:08:27 up 14:02,  2 users,  load average: 4.26, 51.83, 75.49      11:08:28 up 14:02,  2 users,  load average: 4.26, 51.83, 75.49      11:08:29 up 14:02,  2 users,  load average: 4.26, 51.83, 75.49      11:08:33 up 14:02,  2 users,  load average: 3.92, 50.97, 75.09      11:08:36 up 14:02,  2 users,  load average: 3.61, 50.12, 74.68      11:08:38 up 14:02,  2 users,  load average: 3.61, 50.12, 74.68      11:08:40 up 14:02,  2 users,  load average: 3.61, 50.12, 74.68      11:08:41 up 14:02,  2 users,  load average: 3.32, 49.29, 74.28      11:09:11 up 14:03,  2 users,  load average: 2.01, 44.58, 71.92      11:09:13 up 14:03,  2 users,  load average: 2.01, 44.58, 71.92      11:09:24 up 14:03,  2 users,  load average: 1.70, 43.11, 71.15      11:09:25 up 14:03,  2 users,  load average: 1.70, 43.11, 71.15      11:10:41 up 14:04,  2 users,  load average: 0.48, 33.53, 65.62      11:10:43 up 14:04,  2 users,  load average: 0.44, 32.98, 65.27      11:10:53 up 14:04,  2 users,  load average: 0.38, 31.89, 64.57      11:10:55 up 14:04,  2 users,  load average: 0.38, 31.89, 64.57      11:11:38 up 14:05,  2 users,  load average: 0.18, 27.43, 61.51      11:11:40 up 14:05,  2 users,  load average: 0.18, 27.43, 61.51      11:11:41 up 14:05,  2 users,  load average: 0.18, 27.43, 61.51      11:11:41 up 14:05,  2 users,  load average: 0.16, 26.97, 61.18      11:11:42 up 14:05,  2 users,  load average: 0.16, 26.97, 61.18      11:11:43 up 14:05,  2 users,  load average: 0.16, 26.97, 61.18      11:11:45 up 14:05,  2 users,  load average: 0.16, 26.97, 61.18      11:12:06 up 14:06,  2 users,  load average: 0.10, 24.80, 59.56      11:12:10 up 14:06,  2 users,  load average: 0.10, 24.80, 59.56      11:14:30 up 14:08,  2 users,  load average: 0.01, 15.52, 51.21      11:14:37 up 14:08,  2 users,  load average: 0.01, 15.00, 50.66


title: How do I read the output of `dmesg` to determine how much memory a process is using when oom-killer is invoked?

text: I asked this question: Running `sudo /sbin/service mysqld start` causes system to crash In the comments of one of the answers, a very helpful individual is asking for more information regarding how much memory processes were using when `oom- killer` is invoked. The output of `dmesg` is ~9000 lines, and hundreds of thousands of characters, though. An example of the output that I see multiple times throughout the output is this:               Out of memory: Killed process 21000, UID 48, (httpd).     mysqld invoked oom-killer: gfp_mask=0x201d2, order=0, oomkilladj=0          Call Trace:      [<ffffffff802c1b64>] out_of_memory+0x8b/0x203      [<ffffffff8020fa5d>] __alloc_pages+0x27f/0x308      [<ffffffff802139dd>] __do_page_cache_readahead+0xc8/0x1af      [<ffffffff8021424e>] filemap_nopage+0x14c/0x360      [<ffffffff80208e9d>] __handle_mm_fault+0x444/0x144f      [<ffffffff8020622a>] hypercall_page+0x22a/0x1000      [<ffffffff8020622a>] hypercall_page+0x22a/0x1000      [<ffffffff80266d94>] do_page_fault+0xf72/0x131b      [<ffffffff802456a8>] sys_rt_sigreturn+0x327/0x35a      [<ffffffff8026393d>] _spin_lock_irq+0x9/0x14      [<ffffffff802296ed>] do_sigaction+0x18c/0x1a1      [<ffffffff8025f82b>] error_exit+0x0/0x6e          Mem-info:     DMA per-cpu:     cpu 0 hot: high 0, batch 1 used:0     cpu 0 cold: high 0, batch 1 used:0     DMA32 per-cpu:     cpu 0 hot: high 186, batch 31 used:30     cpu 0 cold: high 62, batch 15 used:51     Normal per-cpu: empty     HighMem per-cpu: empty     Free pages:        4748kB (0kB HighMem)     Active:114975 inactive:0 dirty:0 writeback:0 unstable:0 free:1187 slab:4839 mapped-file:541 mapped-anon:114505 pagetables:1332     DMA free:2004kB min:48kB low:60kB high:72kB active:540kB inactive:0kB present:9076kB pages_scanned:5699645 all_unreclaimable? yes     lowmem_reserve[]: 0 489 489 489     DMA32 free:2744kB min:2804kB low:3504kB high:4204kB active:459360kB inactive:0kB present:500960kB pages_scanned:11998796 all_unreclaimable? yes     lowmem_reserve[]: 0 0 0 0     Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no     lowmem_reserve[]: 0 0 0 0     HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no     lowmem_reserve[]: 0 0 0 0     DMA: 1*4kB 0*8kB 1*16kB 0*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 0*2048kB 0*4096kB = 2004kB     DMA32: 12*4kB 3*8kB 1*16kB 1*32kB 1*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 2744kB     Normal: empty     HighMem: empty     586 pagecache pages     Swap cache: add 0, delete 0, find 0/0, race 0+0     Free swap  = 0kB     Total swap = 0kB     Free swap:            0kB     131072 pages of RAM     5993 reserved pages     5581 pages shared     0 pages swap cached     klogd invoked oom-killer: gfp_mask=0x201d2, order=0, oomkilladj=0          Call Trace:      [<ffffffff802c1b64>] out_of_memory+0x8b/0x203      [<ffffffff8020fa5d>] __alloc_pages+0x27f/0x308      [<ffffffff802139dd>] __do_page_cache_readahead+0xc8/0x1af      [<ffffffff8021424e>] filemap_nopage+0x14c/0x360      [<ffffffff80208e9d>] __handle_mm_fault+0x444/0x144f      [<ffffffff80263929>] _spin_lock_irqsave+0x9/0x14      [<ffffffff80263929>] _spin_lock_irqsave+0x9/0x14      [<ffffffff80251144>] finish_wait+0x32/0x5d      [<ffffffff80266d94>] do_page_fault+0xf72/0x131b      [<ffffffff802ff918>] kmsg_read+0x3a/0x44      [<ffffffff8025f82b>] error_exit+0x0/0x6e          Mem-info:     DMA per-cpu:     cpu 0 hot: high 0, batch 1 used:0     cpu 0 cold: high 0, batch 1 used:0     DMA32 per-cpu:     cpu 0 hot: high 186, batch 31 used:45     cpu 0 cold: high 62, batch 15 used:51     Normal per-cpu: empty     HighMem per-cpu: empty     Free pages:        4748kB (0kB HighMem)     Active:114975 inactive:0 dirty:0 writeback:0 unstable:0 free:1187 slab:4824 mapped-file:541 mapped-anon:114505 pagetables:1332     DMA free:2004kB min:48kB low:60kB high:72kB active:540kB inactive:0kB present:9076kB pages_scanned:6531037 all_unreclaimable? yes     lowmem_reserve[]: 0 489 489 489     DMA32 free:2744kB min:2804kB low:3504kB high:4204kB active:459360kB inactive:0kB present:500960kB pages_scanned:36231106 all_unreclaimable? yes     lowmem_reserve[]: 0 0 0 0     Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no     lowmem_reserve[]: 0 0 0 0     HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no     lowmem_reserve[]: 0 0 0 0     DMA: 1*4kB 0*8kB 1*16kB 0*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 0*2048kB 0*4096kB = 2004kB     DMA32: 12*4kB 3*8kB 1*16kB 1*32kB 1*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 2744kB     Normal: empty     HighMem: empty     586 pagecache pages     Swap cache: add 0, delete 0, find 0/0, race 0+0     Free swap  = 0kB     Total swap = 0kB     Free swap:            0kB     131072 pages of RAM     5993 reserved pages     5581 pages shared     0 pages swap cached     Out of memory: Killed process 21001, UID 48, (httpd).     sudo invoked oom-killer: gfp_mask=0x201d2, order=0, oomkilladj=0          Call Trace:      [<ffffffff802c1b64>] out_of_memory+0x8b/0x203      [<ffffffff8020fa5d>] __alloc_pages+0x27f/0x308      [<ffffffff802139dd>] __do_page_cache_readahead+0xc8/0x1af      [<ffffffff8021424e>] filemap_nopage+0x14c/0x360      [<ffffffff80208e9d>] __handle_mm_fault+0x444/0x144f      [<ffffffff8020622a>] hypercall_page+0x22a/0x1000      [<ffffffff8020622a>] hypercall_page+0x22a/0x1000      [<ffffffff80266d94>] do_page_fault+0xf72/0x131b      [<ffffffff8024901b>] skb_dequeue+0x48/0x50      [<ffffffff80254146>] unix_release_sock+0x19e/0x1fa      [<ffffffff80261df5>] thread_return+0x6c/0x113      [<ffffffff80207116>] kmem_cache_free+0x84/0xd7      [<ffffffff80207116>] kmem_cache_free+0x84/0xd7      [<ffffffff8025f82b>] error_exit+0x0/0x6e          Mem-info:     DMA per-cpu:     cpu 0 hot: high 0, batch 1 used:0     cpu 0 cold: high 0, batch 1 used:0     DMA32 per-cpu:     cpu 0 hot: high 186, batch 31 used:165     cpu 0 cold: high 62, batch 15 used:48     Normal per-cpu: empty     HighMem per-cpu: empty     Free pages:        4760kB (0kB HighMem)     Active:114996 inactive:0 dirty:0 writeback:0 unstable:0 free:1190 slab:4821 mapped-file:541 mapped-anon:114468 pagetables:1225     DMA free:2004kB min:48kB low:60kB high:72kB active:540kB inactive:0kB present:9076kB pages_scanned:7319613 all_unreclaimable? yes     lowmem_reserve[]: 0 489 489 489     DMA32 free:2756kB min:2804kB low:3504kB high:4204kB active:459444kB inactive:0kB present:500960kB pages_scanned:13331345 all_unreclaimable? yes     lowmem_reserve[]: 0 0 0 0     Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no     lowmem_reserve[]: 0 0 0 0     HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no     lowmem_reserve[]: 0 0 0 0     DMA: 1*4kB 0*8kB 1*16kB 0*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 0*2048kB 0*4096kB = 2004kB     DMA32: 5*4kB 8*8kB 1*16kB 1*32kB 1*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 2756kB     Normal: empty     HighMem: empty     586 pagecache pages     Swap cache: add 0, delete 0, find 0/0, race 0+0     Free swap  = 0kB     Total swap = 0kB     Free swap:            0kB     131072 pages of RAM     5993 reserved pages     4629 pages shared      How do I read this in a way that can help me perform this task: > In the process list that gets dumped into dmesg at the time of the OOM > condition, one of the columns should include how much memory each process is > using. ...put that output in your question...


title: How to make vim apply /var/log/messages syntax highlighting to any file called "messages" or "messages-*"?

text: I love vim's colorization of `/var/log/messages`, but it only works for that – the absolute filename. It doesn't work for older rotations of messages (e.g. `/var/log/messages-20120610`) or for messages files I get from other systems. How can I tweak this?


title: What happens to the output of a process that has been disowned and lost its terminal?

text: If I close the virtual terminal, where some process was started, does the output just go straight to `/dev/null`, or can it pollute memory somehow? **Can I anyhow grab the output to continue reading it at any point after that?** **[EDIT]: So, is the moment of disowning a process effectively an end of my power to control its output?** I also noticed, that if I disown a stopped process, at first everything seems normal: it is neither terminated nor shown in jobs. But if I log out (and I _don't_ mean close the terminal, just exit from `su`, for instance), the process is terminated. All the same, a background-running disowned process can stay running.


title: How to customize Dell PowerEdge 2970 LED info screen via CentOS?

text: As shown in the photo below, the Dell PowerEdge 2970 as an information screen on it. I have CentOS installed. Is there a way via the OS to change this data? If so, how? Thanks in advance! ![enter image description here](http://i.stack.imgur.com/LgZYW.jpg)


title: Netbook Remix [EasyPeasy]: How to add a Mozilla Prism to Favorites

text: I'm setting up a old laptop with EasyPeasy, the only Linux distro I could get to install on it. I want to put a Prism in the favorites that will bring up a web site we use frequently. I created the Prism, and its icon is in the desktop folder, but that does nothing as the desktop is hidden. I can navigate to the folder and launch it, but the point of creating it is easy access. How do I get the launcher to the favorites, so that as soon as the machine is booted up the user sees it right in front of them?


title: Xorg with Intel G41 videocard

text: My PC has an integrated **Intel G41** video. I have been running Debian Squeeze for several years without any problems. Recently I upgraded to Wheezy and now after my computer wakes from sleep, X appears to be dead. In `Xorg.0.log` I see the following:               [  5123.481] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed: Invalid argument     [  5123.481] (WW) intel(0): I830DRI2ScheduleWaitMSC:1524 get vblank counter failed: Invalid argument     [  5131.489] (EE) intel(0): Detected a hung GPU, disabling acceleration.     [  5131.489] (EE) intel(0): When reporting this, please include i915_error_state from debugfs and the full dmesg.     [  5131.490] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed: Invalid argument     [  5131.490] (WW) intel(0): I830DRI2ScheduleWaitMSC:1524 get vblank counter failed: Invalid argument      I searched Google's and found suggestions to add `"DRI" "false"` to `/etc/X11/xorg.conf`. I tried that but then X only starts in "safe" mode.


title: `^M` at the end of each line of text files generated under Windows

text: I was wondering why if you open a textfile made in Windows notepad under unix you will find that it has `^M` where there should be a new line? My understanding is that in Windows, every line is ended with `\r\n`, ie `0x0D0A` in ASCII, while `^M` has ASCII value `0x5E4D`. I cannot relate these two from one to the other.


title: Utility to get binary representation from string?

text: Is there a simple utility like `printf` that'll give me a "binary representation", i.e. a string like "01010010", from an input string? It would need to support multi-byte encodings.


title: Warning: Group GNOME Desktop Environment does not exist

text: I am still having problems connecting to X server on CentOS 6.5 My mac has it (X server) installed by default and opens no problem and if I command `startx` it looks for connections but my remote linux vps is still unable to connect regardless of commands to correct permissions or no root login. So it occurred to me maybe I don't have X server installed on the linux vps so I went to `yum groupinstall "GNOME Desktop Environment" vncserver` and it says it doesn't exist. Then I did `yum groupinstall Desktop` which worked. So my question is am I on track to getting a GUI working? Am I correct in thinking I don't have an X server installed on remote linux system and that is why it won't work? I did find a grep command to check and see if it is there before I started installing the above and did see X in the list so hopefully I am not adding any unnecessary libraries etc. update: have removed all installs because it makes no difference to being unable to connect to X server and actually I am thinking it is much easier and saves memory if I just do my editing of images in photoshop as usual and forget imagemagick and X server although it bugs me I couldn't get it working! grrr update2: After doing that it just started on `startx` with lots of warnings so obviously one of the installs triggered something.


title: DNSSEC in the root zone? How to use it?

text: I'm using Fedora for desktop use and I:               yum -y install caching-nameserver     service named restart     chkconfig --level 5 named on      on it, and set the nameserver to 127.0.0.1. If I:               dig google.com | grep SERVER     ;; SERVER: 127.0.0.1#53(127.0.0.1)      Then I can see it's ok … I'm using my previously installed local DNS cache server! Hurrah! (no more crappy DNS from my ISP..) Then I tried `tcpdump`:               tcpdump -n -i eth0 dst port 53      All I can see that my Local DNS server doesn't use my ISP's DNS server for resolving, rather it uses the root servers (IP address) DNS server to resolve my domain names (the ones I type in my webbrowser). _Question #1_ : Does my local DNS caching server really **only uses just** the root servers DNS server for resolving? _Question#2_ : If using DNSSEC gives me more security regarding DNS, then how could I set my pc/local dns cache to only use and only allow DNSSEC? I think DNSSEC is deployed years (?) ago on the root DNS servers. **Update** : I had misunderstood something, and to use only DNSSEC I would need that: all the NS's of the domains that I'm visiting must be configured to use DNSSEC - and that's not very widely used, so I can't use only DNSSEC.


title: How can I set an e-mail's headers using /usr/bin/mail?

text: I have a bunch of scripts on an IBM AIX server's crontab that call the mail command to send myself an e-mail, kinda like this:               $ mail -r myon@hakugyokuro.gk -s "Results for `hostname`" myon@hakugyokuro.gk <<EMAILCONTENT     Results of execution of command $COMMAND on `hostname`:          `cat /home/myon/executionresults.txt`     EMAILCONTENT      I intend to put a script that has something like this in a production environment, and as a result I'm trying to find a way to set mail headers using AIX's `/usr/bin/mail` so that the mails that come from Production arrive to my inbox as high priority. Migrating to Perl's Mail package would take a while, so it preferentially has to be with the standard mail command. I couldn't find an option to specify a mail header neither on `mail` nor on `sendmail` (which from what I gathered receives any option that mail can't already parse, in this case the `-r`). Any idea of how to set headers this way? **EDIT** : Thanks for the answer :3 here's how it worked, reworked so that it looks a bit more like the exhibit above:               $ sendmail -i -- myon@hakugyokuro.gk <<EMAILCONTENT     From: myon@hakugyokuro.gk     To: myon@hakugyokuro.gk     Importance: High     Subject: Results for `hostname`          Results of execution of command $COMMAND on `hostname`:          `cat /home/myon/executionresults.txt`     EMAILCONTENT


title: Slow NFS, nfsstat -c: what is authrefrsh (aka newcreds?) field about in detail?

text: (net-fs/nfs-utils-1.2.3-r1, 2.6.38.5-zen+ Gentoo) Googling this seems to be a complete dead end. man nfsstat says a whole lot of nothing about the subject. The closest I could get was finding out about what was probably previously "newcreds". > newcreds Number of times authentication information had to be refreshed. My problem is that I _think_ I'm seeing subpar NFS performance over OpenVPN and the only thing I can immediately see that is significantly different than all nfsstat Google results, is that my "calls" field equals exactly "authrefrsh" and is therefore very high. All the search result outputs always had authrefrsh as 0 or a very low number. Before I can move on to debugging some other aspects, I could use finding out what this means. Watched operation is emerging a package over NFS-shared portage. emerge does traverse a big tree during it's operation but previous experience says the performance I'm seeing is abnormal.               $ watch -n 1 nfsstat -c          Every 1,0s: nfsstat -c                                Sat May 21 23:04:55 2011          Client rpc stats:     calls      retrans    authrefrsh     308565     2211       308565          Client nfs v3:     null         getattr      setattr      lookup       access       readlink     0         0% 172372   55% 17        0% 30485     9% 36057    11% 26831     8%     read         write        create       mkdir        symlink      mknod     25879     8% 107       0% 21        0% 0         0% 0         0% 0         0%     remove       rmdir        rename       link         readdir      readdirplus     16        0% 0         0% 11        0% 0         0% 0         0% 16668     5%     fsstat       fsinfo       pathconf     commit     3         0% 50        0% 25        0% 2         0%      I can't figure out exactly what authrefrsh is (and this spelling, is that intentional btw?) and why is it increasing like this in my case?


title: Process Monitor equivalent for Linux?

text: Is there a Unix/Linux equivalent of Process Monitor, whether GUI or CUI? If it makes a difference, I'm looking at Ubuntu, but if there's an equivalent for other systems (Mac, other Linux variants like Fedora, etc.) then knowing any of those would be useful too. ### Edit: Process _Monitor_ is for monitoring system calls (such as file creation or writes), while Process _Explorer_ is for monitoring process status (which is like System Monitor). I'm asking for the former, not the latter. :-)


title: How does the Unix file privilege system differ from that of Windows?

text: Related question: How does the Linux file system/organization differ from Windows? I am somewhat familiar with how privileges work when it comes to files and directories - each entry has an `owner` and `group` property that represent the owner of the file and the group that the owner belongs to (correct me if I'm wrong). How does this differ from the organization of permissions in the NTFS filesystem on Windows? What advantages does Unix's permission system have over NTFS?


title: How to use the date command to find out what date "monday week 40" will be?

text: How can I use the date command to convert something like "monday week 40" into a ISO date? I am playing with something like this:               date --date='monday week 40' +'%Y-%m-%d'      And the date I'm searching for would be 2011-10-03. But my problem is that this date string is not valid, so I need another approach to solve this problem. /Thanks


title: Why is sorting files by access time not working?

text: I tried to use command `ls --time=atime` it was working in one directory but wasn't working in another directory. I opened certain files in vim, evince and other applications but after the command file access times weren't changed. When I type `touch file.txt` the access time is changed, but when I type `vim file.txt` the access time is not changed. What is wrong here?


title: How do I know where to put things in linux?

text: Installing something in windows takes a click of a button. But every time I try to install something in linux, which is not found in APT, I get so confused. You download a zipped folder, then what? If you are lucky there is a README, refering to some documentation, which might help you, if you are lucky. What is the magic trick when "installing" extensions and applications which aren't found in APT? I love linux, but this problem haunts me every day.


title: Compare video and image (percentage of differences)

text: I was wondering if it's possible to get the percentage of difference between a video and an static image using _avconv_ (from libav) I have a surveillance camera constantly providing an RTSP video feed. The camera is statically pointing to the floor. I know how the picture looks like when everything is ok (I have an screenshot of it). Is there a way, using _avconv_ and its magicall filters to get a percentage of variation between the the screenshot and the video coming from the camera? It would be something like the blackframe filter, but instead of having the percentage of "black" in the image, I would like to get the percentage of difference between the screenshot and the video coming from the camera. I know that there's a lot of possible caveats, such as changes in illumination, tiny movements from the camera, but... I'm kind of curious. I am running Ubuntu 64 bits (kernel 3.8.0-29) 12.04 with `avconv` version 0.8.9


title: Debugging Linux machine freezes

text: I have 15 identical Linux RH 4.7 64-bit severs. They run cluster database (cluster is application level). On occasion (every month or so) a random box (never the same though) freezes. I can ping the box and ping works. If I try to ssh in the box I get:               ssh_exchange_identification: Connection closed by remote host      SSH is set up properly. When I go to the server room, and try to login directly to console, I can switch consoles with `Alt`+`Fn`, I can enter a username, and characters do show, but after pressing `Enter`, nothing happens. I waited 8 hours once and it didn't change. I set up syslog to log everything to a remote host, and there is nothing in those logs. When I reboot the machine, it works without a problem. I have run HW tests - everything is ok, and nothing is in the logs. The machines are also monitored with NAGIOS, and there is no unusual load or activity prior to freeze. I have run out of ideas; what else can I do or check?


title: Command to install linux headers fails

text: I need to install my linux headers for an Nvidia driver install. But I get an error when doing so:               peter@peter-deb:~$ sudo apt-get install linux-headers-$(uname -r)     Reading package lists... Done     Building dependency tree            Reading state information... Done     E: Unable to locate package linux-headers-2.6.32-5-amd64     E: Couldn't find any package by regex 'linux-headers-2.6.32-5-amd64'      How can I get this to work? Edit: I am using Deb 6. @Warren Young :               peter@peter-deb:~$ sudo apt-get install -qy linux-headers-$(uname -r)     [sudo] password for peter:      Reading package lists...     Building dependency tree...     Reading state information...     E: Unable to locate package linux-headers-2.6.32-5-amd64     E: Couldn't find any package by regex 'linux-headers-2.6.32-5-amd64'      And also               peter@peter-deb:~$ apt-cache search linux-headers     linux-headers-3.0.0-1-all - All header files for Linux 3.0.0 (meta-package)     linux-headers-3.0.0-1-all-amd64 - All header files for Linux 3.0.0 (meta-package)     linux-headers-3.0.0-1-amd64 - Header files for Linux 3.0.0-1-amd64     linux-headers-3.0.0-1-common - Common header files for Linux 3.0.0-1     linux-headers-3.0.0-1-common-rt - Common header files for Linux 3.0.0-1-rt     linux-headers-3.0.0-1-rt-amd64 - Header files for Linux 3.0.0-1-rt-amd64     linux-headers-2.6-amd64 - Header files for Linux amd64 configuration (dummy package)     linux-headers-2.6-rt-amd64 - Header files for Linux rt-amd64 configuration (dummy package)     linux-headers-amd64 - Header files for Linux amd64 configuration (meta-package)     linux-headers-rt-amd64 - Header files for Linux rt-amd64 configuration (meta-package)      And sources.list:               # Debian packages for testing     deb http://mirror.transact.net.au/debian/ testing main contrib non-free     # Uncomment the deb-src line if you want 'apt-get source'     # to work with most packages.     # deb-src http://mirror.transact.net.au/debian/ testing main contrib non-free          # Security updates for stable     # deb http://security.debian.org/ stable/updates main contrib non-free      Also note, I apt-get updated and this made no difference.


title: setting up mail system

text: So I'm still kind of new to linux, but what are the steps towards setting a linux box up in such a way that it can send mail using shell?               echo "hello world" | mail johnny@moo.com      I mean, I've done the necessary sudo apt-get install mailsystem (or something like that) which sets up the mail command. However, will you also have to set up a .com to point to your linux box as its SMTP server? What else needs to be done?


title: how to copy files from windows to linux witout password using a script or program?

text: I did this to copy files between Windows and Linux.               C:\Documents and Settings\668340\My Documents\putty>pscp  "C:\Documents and Settings\563456\abc.txt" "auto_root@10.39.5.41:/home/auto/"      But it prompts for a password and how do i automate this task using _private/public key pairs_ between windows and linux Even `winscp` works but only problem is that i have to use hard coded password in the code, which I don't want. Instead I want to use private/public key addition concept but not aware how to do it when it is windows. **EDIT** :i mean i can go with passwordless authentication but still it involes ,the manual process of generating public,private keys(.ppk) using `puttygen.exe` in windows and then copying the public key to `.ssh\authorized` in linux.is there any way to automate this. **EDIT** :if there is any of copying files by running some shell script of command in unix to copy file to windows that could also be usefull as i can create public/private keys in unix automatiaclly.


title: How to install a printer that is connected via an USB-to-Parallel-Port adapter?

text: I'm running Sabayon Linux (x86_64).               $ uname -a     Linux qdoe 3.7.0-sabayon #1 SMP Thu Dec 20 07:12:55 UTC 2012 x86_64 Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz GenuineIntel GNU/Linux      I have a HP LaserJet 1100 printer which by default is connected via an 25-pin parallel printer port (DB25). Now, I have a new computer without such a port and I'm not able to directly connect the printer. Therefore, I bought an USB-to-DB25-connector and tried to install my printer. ![USB-to-DB25-connector](http://i.stack.imgur.com/7LxrP.jpg) But here the trouble starts. In Sabayon or Gentoo, there is a toolbox for HP printers called `hplip` which is very easy to use: connect printer, detect it with `hplip` and you are ready to go. ![hplip](http://i.stack.imgur.com/SZ5yY.png) Now the issue is, that the `hplip` software does not recognize the printer. Neither via USB nor via parallel port (LPT). The port seems to work though:               # lsusb     (...)     Bus 002 Device 006: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port      I already tried to manually enter the USB address `067b:2305` into `hplip` - but no success, the printer is not recognized. What else can I do? Is there some kind of further port-emulation software or any drivers I need in addition to make this port work with my printer?


title: Apache server starts automatically after stopping the service

text: What can cause httpd to start automatically after stopping it? In a bash script I need to first stop apache web server. This is the script:               apachectl stop;     while pgrep httpd; do sleep 1; done     echo "[Apache server stopped]"      When I run the script it prints running apache processes until there isn't any running process and prints _[Apache server stopped]_ Then running the command `pgrep httpd` prints nothing, but if I enter a website hosted by the server, then `pgrep httpd` prints some httpd processes. Is this the right way to stop apache? Why does it start automatically after running `apachectl stop`? If it is related to _KeepAliveTime_ , how do I force the running child processes to stop? Edit: This is also true for running `service httpd stop` or `apachectl stop` commands in command line.


title: gcc: fail sanity check error, I suppose due to cxx USE flag missed

text: Recently I've done `emerege -e world` and then found that `gcc` was compiled without `cxx` flag. Now I can't compile any C++ package due to               configure: error: C++ preprocessor "/lib/cpp" fails sanity check      I'm thinking on copying files returned by `equery f gcc|grep -v share ` from stage3. Will it help? Is there any simpler way? **UPDATE 1** Here's my config.log **UPDATE 2** Here's my make.conf Please, note there's `cxx` flag in USE. I've added it recently, but it does not help as I can't rebuild packages. **UPDATE 3** I have tried to reinstall gcc-4.6.3 from binary package via               emerge -avK gcc:4.6      It completed successfully but error didn't go. Also, I've noticed that:               configure:11955: /lib/cpp  conftest.cpp     cpp: error: conftest.cpp: C++ compiler not installed on this system     configure:11955: $? = 1     configure: failed program was:     | /* confdefs.h */     | #define PACKAGE_NAME "expat"     | #define PACKAGE_TARNAME "expat"     | #define PACKAGE_VERSION "2.1.0"     | #define PACKAGE_STRING "expat 2.1.0"     | #define PACKAGE_BUGREPORT "expat-bugs@libexpat.org"     | #define PACKAGE_URL ""     | #define STDC_HEADERS 1     | #define HAVE_SYS_TYPES_H 1     | #define HAVE_SYS_STAT_H 1     | #define HAVE_STDLIB_H 1     | #define HAVE_STRING_H 1     | #define HAVE_MEMORY_H 1     | #define HAVE_STRINGS_H 1     | #define HAVE_INTTYPES_H 1     | #define HAVE_STDINT_H 1     | #define HAVE_UNISTD_H 1     | #define HAVE_DLFCN_H 1     | #define LT_OBJDIR ".libs/"     | /* end confdefs.h.  */     | #ifdef __STDC__     | # include <limits.h>     | #else     | # include <assert.h>     | #endif     |                    Syntax error      Looks like it claims that C++ compiler is not installed on my system. But this sounds like rubbish, since `gcc:4.6` was installed from bin-package and I assume it's compiled with C++ support. **UPDATE 4** Indeed there's a problem with g++               uhradio ~ # g++ queue.cpp      gcc-config: error: could not run/locate 'g++'     uhradio ~ # cpp queue.cpp      cpp: error: queue.cpp: C++ compiler not installed on this system      The output from `gcc-config -l` is:               [1] x86_64-pc-linux-gnu-4.6.3 *