list running processes in linux

i have always used

# ps awx

for listing system process information. but recently i wanted to list more specific memory and processor details in snapshot mode of the entire system. the command # top is great for monitoring a live system, but if you want to be able to store snapshots of processes for logging, # ps is the command to start from. i was led to the -u switch and have been using the following version:

# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

Don’t Forget About Live CD’s

So I’ve been troubleshooting this computer. It’s a Windows XP machine, relatively new, decent hardware, all SiS integrated components. Video works fine, USB works fine all SATA components are fine. No matter what I do I can’t get the network card to work –> fails to obtain a lease, static IP configuration doesn’t allow me to ping my local gateway. I have tried all my tricks, hard coding the MAC address into a static lease in the router, setting up both DHCP and a matching static in the machine. The network cable is good, DHCP works fine on other machines on the same cable. Also, the HD audio is not producing any noise either.

 

I’ve ran my personal tools, (ComboFix, CCleaner, Advanced System Care and Malware Bytes Anti-Malware) and they found a few things but nothing major. The customer’s machine currently has Spyware Doctor installed and it may have interfered with ComboFix, but I did disable it. I even uninstalled the NIC and rebooted (there were no previous drivers to roll back to). After exhausting these resources onsite, I asked if I could bring it back to the office for diagnosis. My initial gut told me it was a software issue, but at this point I’m leaning toward failed hardware.

 

Why I didn’t think of it while I was onsite I am not sure, but it occurred to me that I could runfull hardware tests from a Live CD – I downloaded and burned to disc the most recent CD-sized Knoppix (6.2.11) – a great tool for trying out hardware, trying out Linux and just all around access to things Winbloze just doesn’t allow.

 

Sure enough I booted Knoppix and was instantly online on the same network card that ethernet would not work in Windows. Software issue.

 

I’ve since booted the AVG Rescue CD and was scanning overnight, and have burned the newest SiS network and audio drivers to disc for a reinstall. I am not sure what the final issue will be proven to be, but the point is, don’t overlook live Linux CD’s as part of routine testing. It can save valuable hours of troubleshooting and truly isolate the problems to hardware or software.

remove stale locks vmware server 2

so my virtual machine server went down in my office the other day, and the auto startup for a specific machine failed because there was a lock file present from before the power failure (time to replace my ups)

it was easy enough to fix by removing the folder located at:

/var/lib/vmware/Virtual\ Machines/{vm-name}/{vm-disk-file-name}.vmdk.lock/

for me the command was:

# rm -vfr /var/lib/vmware/Virtual\ Machines/nataile/natalie-hardDisk1.vmdk.lock/

unpack multiple files at once using xargs

how to upack all tarball gunzips .tar.gz in a given directory at a time

ls *.tar.gz | xargs -t -I {} tar -zxvf  {}

*note: after the -t it is a -I as in -(capital)i

substitute your flavors at -zxvf and adjust file list at the ls command before the pipe

compiling from source against 2.6.33

i screwed up my slackware install on my laptop, did a reinstall, realized i installed 32-bit and decided to roll with it. everything i have gone to install out of the official tree has needed some patching due to the new kernel.

apparently the new kernel (2.6.33) no longer generates a file named /usr/src/`uname -r`/linux/autoconf.h and instead generates one named /usr/src/`uname -r`/generated/autoconf.h –> what this means to compiling from source is that all references to the linux/autoconf.h must be redirected to generated/autoconf.h

trust me that this is a major headache that isn’t very well documented yet