Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Operating System - Tru64 Unix
cancel
Showing results for 
Search instead for 
Did you mean: 

controlling collect output

SOLVED
Go to solution
vishnupaturi
Occasional Visitor

controlling collect output

Hi,
I'm using collect -s c -i 1, i/m getting scrolling output,
Please help me in controlling the output after 1 sec.
6 REPLIES
Ivan Ferreira
Honored Contributor

Re: controlling collect output

You need ":" after the interval specification. I think that one second is a too low value. For example:

collect -sc -i 5:
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Victor Semaska_3
Esteemed Contributor

Re: controlling collect output

The command will work without the colon(:). If you're talking about keeping the output from scrolling off the screen then pipe it to more

# collect -s c -i 1 | more

Vic
There are 10 kinds of people, one that understands binary and one that doesn't.
Venkatesh BL
Honored Contributor

Re: controlling collect output

You could also store to a file using the '-f' option and then playback using the '-p' option.
vishnupaturi
Occasional Visitor

Re: controlling collect output

The solution given by you is helpful to some extend, but my prob is after getting the output with -f option or more option control should come out.

Ex: i'm runnung this cmd from a perl telnet module $t -> cmd("-sc -i 5");
After getting the output control should come to the script, here collect cmd is continuously running.Please help me

Thanks
Vishnu
Venkatesh BL
Honored Contributor
Solution

Re: controlling collect output

Well, collect is designed to continously collect system data. If you want to run it only for a particular duration, you could try the '-R' flag. See manpage for more info.
vishnupaturi
Occasional Visitor

Re: controlling collect output

Thank you ...!
I got the expected solution.

Thanks
Vishnu Paturi.