Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logging a topas/monitor into a file

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Feb 6, 2002
1,851
IL
Dealing with capturing a system status into a text log file - I'd like to capture 1 topas/monitor/nmon screen into this log.

I need it to look exactly the way it looks on the screen- unformatted,neither for excel or anything else.
Playing with topas/monitor/nmon - did not reach this goal so far.
Would appreciate any ideas.
Thanks

Long live king Moshiach !
 
MIke,

capture seems to be the giving what I need.
However I have failed so fat to run it offline from script:

# cat kkk
echo "" >/tmp/ANSWER
echo "topas" >> /tmp/ANSWER

# cat lll
capture < kkk >l.log
sleep 4
kill `ps -ef |grep -v grep|awk '/topas/ {print $2}'`

running lll gives error :
lll
tcgetattr: Not a typewriter
Terminated

Long live king Moshiach !
 
I would guess you need expect for that kind of stuff. capture needs a tty or pty as stdin, a text file won't do.



HTH,

p5wizard
 
Thanks,p5wizard

Unfortunately "expect" is not part of our standard AIX 5.2 ML01 SW (which we distribute it to our 5000 customers ...).
Does not make sense to me to get an "expect" package added to our oficial AIX vesrion - just to get one topas screen captured into the log.
Will have to leave without it - was "nice to have".
Thanks to all.

Long live king Moshiach !
 
sbix,

I need the topas (pr could be nmon) ,couple of screens ,AS SEEN ON THE SCREEN,into a text log.And it's activated from a script that collects system info ....
nmon did not get me there .
Thanks

Long live king Moshiach !
 
Uhm ... I see ... you need to capture a screen shot as "evidence on the crime scene" ....
... what about the timing of the screen shot?
Well ... you can reduce the amount of non printable chars by running topas with -m switch ... then you can set the sampling interval with -i switch and execute something like:
topas -mi 3 > goofie 2>&1 &
TOPAS=$!
sleep 7 # To capture 2 screen shots
kill -9 $TOPAS
 
topas -mi 3
topas: illegal option -- m

Usage: topas [-d number_of_monitored_hot_disks]
[-h show help information]
[-i monitoring_interval_in_seconds]
[-n number_of_monitored_hot_network_interfaces]
[-p number_of_monitored_hot_processes]
[-w number_of_monitored_hot_WLM classes]
[-c number_of_monitored_hot_CPUs]
[-P show full-screen process display]
[-U username - show username owned processes with -P]

Long live king Moshiach !
 
uhm ... I don't know which version of topas you're running ...(I am running AIX 5.2 ML05)
well -m switch means monochrome ... so it isn't that important
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top