==> 在 [email protected] (鑑古知今) 的文章中提到:
> 我有四台灌Redhat5.1的機器,己利用NFS和NIS串好了,但不知道linux上有沒有什麼程
> 式,可以自行去判斷那一台的電腦load的最小就送到那台去run的程式呢?
> 謝謝!!
No handy packages available, but many home-brew real dirty workarounds ;)
1. use rsh and small socket script.
edit /etc/services, add an arbitary port for uptime (>1024)
edit /etc/inetd.conf, add
uptime stream tcp nowait nobody /usr/sbin/tcpd /usr/bin/uptime
kill -HUP inetd's pid
write a script to
telnet hosta uptime_port
telnet hostb uptime_port
telnet hostc uptime_port
telnet hostd uptime_port
12:12pm up 1 day(s), 3 min(s), 2 users, load average: 0.00, 0.01, 0.02
You should get 4 lines of something like the above, compare the last 3
numbers, find out the host with the lowest load.
then, rsh the_victim_host your_command
2. use bind+load_balance_patch
Never tried it. Last time I saw it, it's still in beta stage. Surf the net,
you should be able to find some infos on this.
--
Tony C. Wu
--
'Alone, adj.: In bad company. -- Ambrose Bierce, The Devil's Dictionary'
--
※ Origin: 清華電機 ◆ From: nsemon02.att.net.tw