- 论坛徽章:
- 0
|
拣破烂的还有成为破烂王的,做乞丐的也有成为丐帮帮主的呢。
做linux的也有拿很高工资的,以前redflag也给过我开过6k,也只不过做实施和维护而已。6k还算低的呢,你去问问google和nortel里维护linux和unix的人工资是多少,还有那些厂商里的expert
大家叫做linux网管工资低,可厂家还说招不到工程师呢。
这个大概可能是技术水平和在IT圈子里的人脉问题把
不要以为用shell和perl做网管简单,我贴个shell程序来看看吧:
#!/bin/sh
#programmed by BingoSek,20040219
#Function:
#1)compare raid controller event log, if it's different, something must happened on controller, send all status to receiver within the mail-list
#2)backup status of raid controller every running
#3)backup event of raid conftriller once event changed
#IBM command-line tool,ippsend must be placed at /bin/
#zip tool /usr/sbin/bzip2 must exist
#log file,be placed at /var/log/storage_backup/
#shell script and mail-list must be placed /home/storage_backup/
#Setup:set cronjob as this:
#0 */4 * * * /home/storage_backup/backup-raid-controller >> /var/log/storage_backup/error_cron.log 2>&1
home_dir=/home/storage_backup
log_dir=/var/log/storage_backup
date=`date +%Y%m%d`
time=`date +%H%M%S`
hostname=`/bin/hostname`
sender="$hostname""@Raid_Server"
subject='Raid controller may be critical'
compressor="/usr/bin/bzip2"
mailer="/usr/sbin/sendmail"
raid_event_diff="NO"
event_file="$log_dir/raid_controller_event"
status_file="$log_dir/raid_controller_status.$date.$time"
mail_list=$home_dir/mail_list
#function for send mail,usage: smail receiver sender subject mail_text_file
smail()
{
receiver=$1
sender=$2
subject=$3
mail_text_file=$4
tmp=/tmp
mailer="/usr/sbin/sendmail"
echo "From: $sender" > $tmp/mail
echo "To: $receiver" >> $tmp/mail
echo "Subject: $subject" >> $tmp/mail
echo "Content-Type: text; charset=big5;" >> $tmp/mail
echo $mail_text_file
cat $mail_text_file >> $tmp/mail
$mailer -v $receiver < $tmp/mail
rm -f $tmp/mail
}
#function for multiple send,usage:smail_group sender subject mail_list mail_text_file
smail_group()
{
sender=$1
subject=$2
mail_list=$3
mail_text_file=$4
for i in `cat $mail_list | grep -v "#"`
do
smail $i $sender "$subject" $mail_text_file
done
}
#function for dump raid controller status,usage:get_status controller_number status_file
get_status()
{
controller_number=$1
status_file=$2
backup_program=/bin/ipssend
date=`date +%Y%m%d`
echo $date > $status_file
echo "-------------------------------------------------------------------------------------" >> $status_file
$backup_program GETBST $controller_number >> $status_file 2>&1
echo "-------------------------------------------------------------------------------------" >> $status_file
$backup_program GETCONFIG $controller_number AL >> $status_file 2>&1
echo "-------------------------------------------------------------------------------------" >> $status_file
$backup_program GETSTATUS $controller_number >> $status_file 2>&1
}
#function for dump event,usage:get_event conftroller_number event_file
get_event()
{
controller_number=$1
event_file=$2
backup_program=/bin/ipssend
echo "---------------------------------------------------------------------------" > $event_file
$backup_program GETEVENT $controller_number HARD > $event_file 2>&1
echo "---------------------------------------------------------------------------" >> $event_file
$backup_program GETEVENT $controller_number DEVICE >> $event_file 2>&1
echo "---------------------------------------------------------------------------" >> $event_file
$backup_program GETEVENT $controller_number DDD >> $event_file 2>&1
}
#main program
#initialize file
test -f /bin/ipssend || (echo "install ippsend to /bin first!!" ; exit)
test -d $log_dir || (mkdir $log_dir ; echo "$date-$time:First time running, create $log_dir")
#test -f $event_file || ( echo "$date-$time:First time running, create $event_file" ; get_event 1 $event_file)
test -f $event_file || ( echo "$date-$time:First time running, create $event_file" ; get_status 1 $event_file)
#backup status file
get_status 1 $status_file
#compare event log
mv $event_file $event_file."old"
#get_event 1 $event_file
cat $status_file > $event_file
diff -b -B $event_file $event_file."old" | grep "<" > $log_dir/diff.tmp
#if any event generate, send event and status to receiver
if [ -s $log_dir/diff.tmp ]
then
cat $log_dir/diff.tmp > $log_dir/mail.tmp
cat $status_file >> $log_dir/mail.tmp
echo "$subject"
smail_group $sender "$subject" $mail_list $log_dir/mail.tmp
cp $event_file $event_file."changed".$date.$time; $compressor $event_file."changed".$date.$time
mv $event_file."old" $event_file."original".$date.$time ;$compressor $event_file."original".$date.$time
fi
#clean temp file
test -f $log_dir/diff.tmp && rm $log_dir/diff.tmp
test -f $log_dir/mail.tmp && rm $log_dir/mail.tmp
test -f $event_file."old" && rm $event_file."old"
#compress file
$compressor $status_file
这个程序是把raid controller的告警信息下log,并sendmail给网管邮箱的,还有其它一些程序,例如对voip进行录音并且转换为mp3的,给一百多台unix服务器一次性配置的script,我就不贴出来了,我认为自己还只是学了一点皮毛而已,如果精通perl和linux机制,虽说不是上天入地无所不能,到也可以说到达网管的顶端了
至于说到code,一个顶级网管是要能看得懂的,只有这样才能谈得上精通机制,linux很多底层的东西是没有文档的,唯一的方法是看code了,比如说/etc/passwd中第7个字段的含义,linux文档上是没有详细描述的(这是一本书上看到的)。
说到CCNP,我的经验是一个有经验的CCNP并不比CCIE差多少,毕竟现在的CCIE大多是paper和lab弄出来的,君不见现在的CCIE都上万号了吗?那些靠前的CCIE才真是有水平,我就见过一个4000左右的CCIE,是看RFC过的,讲课的时候说到某个知识点并不是说在书上哪一页,而是说在哪个RFC的哪一段,这才是牛人!!
不要以为CCIE有多nb,我身边就有几个CCIE,叫他写方案就得写方案,叫他配置就得配置,叫他半个小时到场就得到场,也不觉得CCIE有咋地 |
|