This is a discussion on vmstat execution via ssh don't go background within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hello, I have a problem with ssh and vmstat on AIX. I want to run a vmstat from a ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, I have a problem with ssh and vmstat on AIX. I want to run a vmstat from a client like this : user@client> ssh -l user server " vmstat -t 60 10 > /tmp/vmstat.log & " Problem is : the ssh don't terminate. In fact, the commande itself seems to go in background, when i hit Ctrl-C it stays alive (so i don't need a nohup); But if i start this command with a crontab entry, it will hang forever... Any ideas ? version of AIX is 5.3 on pSeries, but i'm pretty sure it ... well IT IS the same on Solaris, i tested it. (Except that the -t option don't work on Solaris) Thanks in advance Denis Valdenaire |
| |||
| On 2006-05-12, Denis Valdenaire <dvaldenaire@gmail.com> wrote: > user@client> ssh -l user server " vmstat -t 60 10 > /tmp/vmstat.log & " > > Problem is : the ssh don't terminate. In fact, the commande itself > seems to go in background, > when i hit Ctrl-C it stays alive (so i don't need a nohup); sshd is waiting for the descriptors attached to the vmstat to close (you redirected stdout, but stdin and stderr are still there). Try: ssh server "vmstat -t 60 10 >/tmp/vmstat.log </dev/null 2>/dev/null &" -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement. |