Thursday, December 15, 2011

Surveying a Linux System, Part 3 - Usage

This is the last in my Linux survey trifecta, examining current usage, plus a bit of troubleshooting.

As with both the hardware and software posts, you may need to run some of these as root and your mileage may vary, since not all distros are alike.

Show a list of recent logins
# last

Process list (check out additional switches)
# ps -A

Current performance and PIDs (you can use kill to end a runaway process)
# top

Current memory usage
# free

Disk usage (shows directories by size, based on your current location, usually best to start from root /)
# du -sh *

Network status (lots of switches to drill down with)
# netstat -a

Time since last reboot
# uptime

I'll add to these lists as I come across more useful commands. Thanks to O'Reilly for the command directory.

No comments:

Post a Comment