A Simple Monitor Script
[codesyntax lang="bash" lines="no"] #!/bin/bash #monitor network #kim #影响linux性能的主要因素 #CPU #内存 #磁盘I/O带宽 #网络I/O带宽 while : ; do time=`date +%m"-"%d" "%k":"%M` day=`date +%m"-"%d` rx_before=`/sbin/ifconf… Continue reading
My /etc/rc.local in Development Server of RHEL
[codesyntax lang="bash"] #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V sty… Continue reading
One Tips for the Loading Order of Environment Files
loading order which? who? when? 1 /etc/enviroment system once 2 /etc/profile (& /etc/profile.d/*) all users once 3 ~/.bash_profile | ~/.bash_login | ~/.profile you once 4 ~/.bashrc you each time 5 /et… Continue reading
Linux Hardware Detection
[codesyntax lang="bash"] # Linux Version $ cat /proc/version # System Core $ uname -a # CPU Type $ cat /proc/cpuinfo | grep "model name" | head -1 # Base Board Information $ dmidecode | more # Total M… Continue reading
Linux C hello world
1. vi functions.c [codesyntax lang="c"] #include <stdio.h> void hello_world(void) { printf("hello world!!\n"); } [/codesyntax] 2. vi hello.c [codesyntax lang="c"] #include <stdio.h> #include <stdlib.h… Continue reading
My Linux files/dirs Distribution
Here is my linux files/dirs distribution. Main purpose is to easily centralized data maintenance. Company abc's directory /data/abc/ All web applications /data/abc/vhosts/ All the packages and depende… Continue reading
Install Webbench
1. Install [codesyntax lang="bash"] $ wget http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz $ mkdir /usr/local/man $ tar zxvf webbench-1.5.tar.gz $ cd webbench-1.5 $ make && make install… Continue reading
Use SMTP with Telnet
Test local SMTP : [codesyntax lang="bash" lines="no" container="pre" tab_width="4"] $ telnet localhost 25 $ helo localhost $ mail from:xx@abc.com $ rcpt to:xqpmjh@gmail.com $ data $ subject:and i love… Continue reading