LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
LinkBack Search this Thread
Old 11-05-2012, 10:31 AM   #1
beeblequix
Member
 
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:
http://www.linuxquestions.org/questi...le-4175434912/

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
do
[[ "${INFILE}" == *"event_12345"* ]]
&& ssh beeblequix@beeblequixs_remote_guest.somedomain.com "bash -c /usr/bin/iostat -t >> iostat_on_guest2_when_process_times_out_on_guest1.txt
done


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
beeblequix
Member
 
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 beeblequix@beeblequixs_remote_guest.somedomain.com "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.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 08:43 PM.

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