This is a alternate command I like to use instead of TOP or HTOP to see what are the processes which are taking up the most memory on a system. It shows the username, process ID, CPU usage, Memory usage, thread ID, Number of threads associated with parent process, Resident Set Size, Virtual Memory Size, start time of the process, and command arguments. Then it's sorted by memory and showing the top 10 with head. This of course can be changed to suit you needs. I have a small system which is why Firefox is taking so much resources. Show Sample Output
Monitors basic wireless interface statistics, such as signal strength and discarded packets. The watch command's -n parameter sets a refresh rate of every 1 second. Show Sample Output
Continuously watches postgres, showing the instances using the most RAM at the top. Show Sample Output
This is very handy for troubleshooting apps connection to internet. Shows an app's outgoing ip/port before and after connection established. Run this command and init the app you're investigating. I used that when trying to understand what is the destination's ip/port needed to open in firewall, for a specific VPN app. Similar for windows cmd: netstat -nafo | find /v "LISTENING" | find /v "0.0.0.0" | find /v "127.0.0.1"
OMG, you are a Gentoo junkie. -funroll-loops-me-harder ;-) http://ccache.samba.org/ ccache is a compiler cache, which speeds up your compiler on successive runs, because it caches intermediate compiled output. Show Sample Output
Locally watch MySQL process list update every 5s on a remote host. While you watch pipe to a file. The file out put is messy though but hey at least you have a history of what you see.
Every seconds do Show Sample Output
Monitoring TCP connections number showing each state. It uses ss instead of netstat because it's much faster with high trafic. You can fgrep specific ports by piping right before awk: watch "ss -nat | fgrep :80 | awk '"'{print $1}'"' | sort | uniq -c" Show Sample Output
Streams your timeline on the commandline, required fbcmd https://github.com/dtompkins/fbcmd
This command shows a high level overview of system memory and usage refreshed in seconds. Change -n 10 to you desired refresh interval. Show Sample Output
'watch' repeatedly (default every 2 seconds, -n 1 => every second) runs a command (here ':', a shorthand for 'true'), displays the output (here nothing) and the date and time of the last run. I thought it to be obvious but it seemingly is not: to exit use Ctrl-C.
An improved version of http://www.commandlinefu.com/commands/view/1772/simple-countdown-from-a-given-date that uses Perl to pretty-print the output. Note that the GNU-style '--no-title' option has been replaced by its one-letter counterpart '-t'. Show Sample Output
Useful with new unknown devices or just monitoring, probably useful for the sysadmin. Updates every 2 seconds. More here: http://linuxclisecurity.blogspot.com/2009/12/monitor-kernel-ring-buffer.html.
Change HH:MM with your target time. This is for a Debian/Ubuntu GNU system. You need bash (package bash), date (package coreutils) and toilet (package toilet). Install with: # apt-get install bash coreutils toilet toilet-fonts
This command counts the number of blocked NGINX processes every 2 seconds and shows the last 22 measurements You should have at least the number of cpu's in a non-blocked state. The command up to the first ; truncates the log file. Show Sample Output
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: