|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Junior Member
Iscritto dal: May 2008
Messaggi: 14
|
comando TOP
vorrei realizzare un piccolo script per monitorare utilizzo CPU da parte di un programma usando TOP.. qualcuno di voi ha gia realizzato qualcosa del genere?
|
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Jul 2006
Messaggi: 1175
|
Ti rispondo anche qua:
Top prevede anche un uso batch con l'opzione -b: -b : Batch mode operation Starts top in 'Batch mode', which could be useful for sending output from top to other programs or to a file. In this mode, top will not accept input and runs until the iterations limit you've set with the '-n' command-line option or until killed. Una volta ottenuta la lista puoi selezionare la riga del tuo processo (grep) e la colonna della CPU (cut). Metti tutto in un ciclo while con temporizzatore (sleep) e hai il tuo bel monitor.
__________________
Enermax Staray CS-046 ECA3170-BL, Cooler Master RS-700-AMBA-D3, ASUS P6X58D-E, Core i7 950, Kingston 6GB DDR3 1600 HyperX, Gainward GTX 460 1GB GS, LG BH10LS30, 1TB WD1002FAEX, 2TB WD20EARS, 3TB WD30EZRX, 4TB WD40EFRX, 2x2TB WDBAAU0020HBK, Samsung SCX-3200, Netgear DGN2200 [Debian 7.0 Wheezy] Installazione, consigli e trucchi |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 01:08.



















