Using htop to generate a live website background
drunken-security.at
drunken-security.at
I always end up doing `sudo apt-get install htop`.
Check out htop running my laptop while I had an "ssh-multi" tmux session opened up on an Apache Spark cluster, doing computation 32 cores x 25 nodes = 800 cluster cores! It's so fun to watch all of those cores light up green while doing a big batch job.
https://www.flickr.com/photos/amontalenti/21512617686/in/dat...
We are big fans of htop at Parse.ly. We install it on every one of our nodes.
You can generate HTML (and from that png or whatever) with http://www.pixelbeat.org/scripts/ansi2html.sh like
$ COLUMNS=80 timeout 1 htop > t.ansi
$ ansi2html.sh --bg=dark < t.ansi > t.html
I've requested a -b, --batch option for htop, to simplify this mode of operation. https://github.com/hishamhm/htop/issues/282 Then you could just: $ COLUMNS=80 htop -b | ansi2html.sh ...<( is an example of process substitution, in case anyone is interested. Basically it feeds the stdout of the subshell into the stdin of the read (previous) command. Here is a detailed explanation: http://www.tldp.org/LDP/abs/html/abs-guide.html#PROCESS-SUB
For more information on the subject: http://stackoverflow.com/questions/13763942/bash-why-piping-...
Maybe we could build some automatism which stops the screenshot service while an ssh session is established.
MYSQL_PWD=password mysql -uuser dbI'm no mysql expert but I highly doubt you need more than a few threads (a bunch for the db housekeeping and one per connection), looks like this server is not using pooling. Then again I don't know much about WP and I may be talking out of my behind.
I'm guessing no, but it's neat.
atop > htop