PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > capture cpu utilisation in 15 minute interval through a script
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

capture cpu utilisation in 15 minute interval through a script

Réponse
 
LinkBack Outils de la discussion
Vieux 09/12/2006, 18h11   #1
sangram
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut capture cpu utilisation in 15 minute interval through a script

How to capture cpu utilisation in 15 minute interval through a script.


Thanks in advance...

  Réponse avec citation
Vieux 09/12/2006, 19h46   #2
Michael Paoli
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: capture cpu utilisation in 15 minute interval through a script

sangram wrote:
> How to capture cpu utilisation in 15 minute interval through a script.

$ sar 900 count
Where count is how many 15 minute intervals you want covered. You
can redirect the output to a file or use the -o option of sar to
write it to a file. If you want to do it indefinitely (e.g. until
you kill or otherwise stop the process) you could also do something
like:
while :; do
sar 900 1 >>file
done
Precisely what sar outputs for you by default might vary depending on
your flavor of sar, so you may need to check sar and possibly adjust
options accordingly. The batch utility can also be utilized to run
the program detached from the terminal.

references:
sar(1)
sh(1)
batch(1)
crontab(1)

  Réponse avec citation
Vieux 09/12/2006, 20h05   #3
Tony Lawrence
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: capture cpu utilisation in 15 minute interval through a script


Michael Paoli wrote:
> sangram wrote:
> > How to capture cpu utilisation in 15 minute interval through a script.

> $ sar 900 count
> Where count is how many 15 minute intervals you want covered. You
> can redirect the output to a file or use the -o option of sar to
> write it to a file. If you want to do it indefinitely (e.g. until
> you kill or otherwise stop the process) you could also do something
> like:
> while :; do
> sar 900 1 >>file
> done
> Precisely what sar outputs for you by default might vary depending on
> your flavor of sar, so you may need to check sar and possibly adjust
> options accordingly. The batch utility can also be utilized to run
> the program detached from the terminal.


Sar is actually probably the only thing we can thank SCO for :-)
( http://aplawrence.com/Words2005/2005_03_16.html )

But most sar I've used will take

sar 900 0

as meaning indefinitely.


--
Tony Lawrence
Unix/Linux/Mac OS X Resources
http://aplawrence.com

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 17h39.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08685 seconds with 11 queries