Create a system overview dashboard on F12 key

bind '"\e[24~"':"\"ps -elF;df -h;free -mt;netstat -lnpt;who -a\C-m"""
Command binds a set of commands to the F12 key. Feel free to alter the dashboard according to your own needs. How to find the key codes? Type read Then press the desired key (example: F5) ^[[15~ Try bind '"\e[15~"':"\"ssh su@ip-address\C-m""" or bind '"\e[16~"':"\"apachectl -k restart\C-m"""
Sample Output
F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN    RSS PSR STIME TTY          TIME CMD
4 S root         1     0  0  76   0 -   371 -        528   1 Jun02 ?        00:00:01 init [2]
1 S bind     31818     1  0  80   0 -  9274 rt_sig  2728   1 Jun02 ?        00:00:00 /usr/sbin/named -t /var/named/run-root -c /etc/named.conf -u bind
1 S clamav   32358     1  0  75   0 -   667 pause   1268   0 Jun02 ?        00:00:04 Filesystem            Size  Used Avail Use% Mounted on
/dev/vzfs              30G   25G  5,1G  83% /
tmpfs                 4,0G   64K  4,0G   1% /var/run
             total       used       free     shared    buffers     cached
Mem:          8099       7657        441          0        198       4624
Swap:        16002          3      15998
Total:       24102       7661      16440
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN     27870/mysqld
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN     1499/apache2
tcp        0      0 0.0.0.0:8880            0.0.0.0:*               LISTEN     1706/httpsd
tcp        0      0 87.230.26.178:53        0.0.0.0:*               LISTEN     31818/named
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN     31818/named
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     1825/sshd
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN     31818/named
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN     32482/0
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN     1499/apache2
tcp        0      0 0.0.0.0:8443            0.0.0.0:*               LISTEN     1706/httpsd
                        2009-06-02 12:57             30316 id=si    term=0 exit=0
           system boot  2009-06-02 12:57
           run-level 2  2009-06-02 12:57                   last=S
                        2009-06-02 12:58             31781 id=l2    term=0 exit=0
root     - pts/0        2009-06-22 01:01   .         32484 (p57a704d4.dip0.t-ipconnect.de)
           pts/1        2009-06-21 20:42              5497 id=ts/1  term=0 exit=0

17
By: Neo23x0
2009-06-21 23:57:20

These Might Interest You

What Others Think

Lots of info, but a very useful trick!
mluich · 469 weeks and 1 day ago
I've read the manual of bash but I can't understand the point of "\C-m". Great trick by the way, thanks a lot...
Josay · 469 weeks and 1 day ago
yeah, what's the "-a\C-m" for?
linuxrawkstar · 469 weeks ago
heckuva lot more info that fits on one screen. hardly a dashboard, but i guess some could see that as useful. If you're going to throw out that much information then you might as well add lsof in!
linuxrawkstar · 469 weeks ago
That last piece is for a return. If you omit the \C-m piece the command will print to the screen and you'll still need to hit enter. NICE STUFF
MTecknology · 463 weeks and 6 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

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.

Share Your Commands



Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: