Hi everybody,
sorry if the question will be too trivial for some of you, but I'm not a unix shell programmer expert.
I need to write a script that allows me to rlogin to another machine, check the load (cpu and mem usage) of the new machine, start a process (that will run in the background) and logout.
If I try:
rlogin new-machine
cd path/
...
after the rlogin, it will execute the 'cd' command locally instead of remotely. How can I make the script to execute the commands after the rlogin remotely?
How can I check the machine load?
Please let me know if my approach is completely wrong.
rsh or remsh may work better for you. Check out the man pages. From your description, a cron job may even work for you. The cron job would check the load and start the process.
I don't know which specific load information you are looking for but uname -a or sar may give you what you want.
Hi,
thanks for your reply. I've used the 'rsh' command without problem. Regarding the 'sar' command, I don't have it. I had a look on the web and after I found it, I couldn't complete the installation because it complained about root permissions which I don't have. Is there any other way to install it? Or is it possible to use something else? What about uptime? I don't understand the values of load average in terms of what they are expressed. I just need the percentage of CPU usage, which it doesn't seem to give.