Performance Visualization with Gnuplot, continued

After I post my command to commandlinefu.com, there is an alternative command followed: (echo “set terminal png;plot ‘-’ u 1:2 t ‘cpu’ w linespoints;”; sudo vmstat 2 10 | awk ‘NR > 2 {print NR, $13}’) | gnuplot > plot.png This one is appreciated for using pipes and redirection. It works on Ubuntu Jaunty, on [...]

Posted in: 装备 by Sunng No Comments , , , ,

DB dump with chroot

I caught chroot first time when attempting to install gentoo linux. Of course, its a tool of great useful. Two months ago I had my laptop crashed, and all static files were recovery easily by copy while raw db data file seems to be difficult to handle. The old file system is in a mobile [...]

早起,写一个变色的小程序

以前用Windows的时候,我是说用XP的时候,因为不支持颜色主题,也无从知晓如何通过自动化的方式更换Windows的主题,所以,经常是人肉地每天换主题(其实只是为了换标题栏的颜色),追求新鲜感。 现在用Gnome桌面以后依然保持着这种爱好。遗憾是之前一直没有找到设置存放的位置。前两天在command-line-fu上恰好看到一个变换桌面背景的命令,原来这类配置都存放在gconf里,用gconftool就可以进行操作了。 然后很容易地就能在图形化配置管理器里找到颜色配置的键值位于/desktop/gnome/interface/gtk_color_scheme,值是一个用换行符隔开的名值对,内容就是我们在Appearance配置窗口里看到的那些。good,写个shell小程序每天换颜色! 以下是我孱弱的shell脚本: [codesyntax lang="bash" lines="fancy"] case `date +%w` in 0) color=’#C4C4A0A00000′;; 1) color=’#CECE5C5C0000′;; 2) color=’#8F8F59590202′;; 3) color=’#4E4E9A9A0606′;; 4) color=’#20204A4A8787′;; 5) color=’#5C5C35356666′;; 6) color=’#A4A400000000′;; esac sedcommand=”s/\(selected_bg_color:\)\(.*\)/\1$color/” color_scheme=`gconftool-2 -g /desktop/gnome/interface/gtk_color_scheme | sed $sedcommand` gconftool-2 -t string -s /desktop/gnome/interface/gtk_color_scheme “$color_scheme” [/codesyntax] 每天一换,颜色是tango调色板里的色彩,HOHOHAHA

Posted in: 把戏 by Sunng 4 Comments , ,