Review your favorite Linux distribution.
Go Back > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.


  Search this Thread
Old 11-05-2012, 10:31 AM   #1
Registered: Oct 2005
Location: Tierra Firma, Earth
Distribution: Debian of course...
Posts: 196

Rep: Reputation: 30
Running iostats over ssh on remote guest -- time doesn't show up in report

This is a continuation of my post made here:

I basically wanted to tail a log and run iostats as soon as a specific event showed up. I found that while my command worked fine that the problem I'm looking for is on another guest.

Now I'm running iostats over ssh on a remote guest instead of the local guest once that event shows up:

tail -F logfile.txt | while read INFILE
[[ "${INFILE}" == *"event_12345"* ]]
&& ssh "bash -c /usr/bin/iostat -t >> iostat_on_guest2_when_process_times_out_on_guest1.txt

The iostat -t is supposed to also print the timestamp in the report. My report however does not give the time. I get the regular iostats breakdown. I'd really like to see the remote guest's time as well. How can I make it give be the remote guest's timestamp in the report? Any help appreciated. Thanks.

Old 11-05-2012, 10:35 AM   #2
Registered: Oct 2005
Location: Tierra Firma, Earth
Distribution: Debian of course...
Posts: 196

Original Poster
Rep: Reputation: 30
fixed it :)

I just needed to use single quotes like this:

ssh "bash -c '/usr/bin/iostat -t'" >> iostat_on_guest2_when_process_times_out_on_guest1.txt

Last edited by beeblequix; 11-05-2012 at 10:39 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
firefox doesn't show up properly when run remotely through ssh -Y nass Slackware 12 04-06-2012 10:09 AM
mc and gpm fraud via ssh (remote acces lockup report - resolved) SCerovec Slackware 2 06-23-2008 03:40 AM
text in ssh doesn't show up neocontrol Linux - Software 1 03-14-2007 01:19 PM
ps doesn't report time TrulyTessa Linux - Newbie 6 01-10-2005 04:23 PM
First Time Wizard doesn't show up Darc-Vader Linux - Newbie 13 04-26-2004 03:50 PM > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 06:01 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration