Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 08/07/2019, à 05:54

katian

[RESOLU] uptime & stats sur le long terme (ubuntu server)

hello les gens,

J'ai découvert la commande

uptime

et je me demande si il est possible d'avoir un aperçu sur le long terme des variations du 'load average'

par exemple, j'ai un ubuntu server qui tourne H24 et j'aimerais savoir si il a connu des pics lors des dernières 24h

j'imagine qu'il faille développer un script qui enregistre ces données à intervalles réguliers ou il y t'il plus simple ?

merci

Dernière modification par katian (Le 09/07/2019, à 14:09)

Hors ligne

#2 Le 09/07/2019, à 13:48

katian

Re : [RESOLU] uptime & stats sur le long terme (ubuntu server)

avec un crontab peut être...

Hors ligne

#3 Le 09/07/2019, à 13:56

Watael

Re : [RESOLU] uptime & stats sur le long terme (ubuntu server)

oui.


Connected \o/
Welcome to sHell. · eval is evil.

En ligne

#4 Le 09/07/2019, à 14:10

katian

Re : [RESOLU] uptime & stats sur le long terme (ubuntu server)

crontab -l
# Edit this file to introduce tasks to be run by cron.
# 
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
# 
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').# 
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
# 
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
# 
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
# 
# For more information see the manual pages of crontab(5) and cron(8)
# 
# m h  dom mon dow   command
* * * * * uptime >> /tmp/uptime.log

Hors ligne

#5 Le 09/07/2019, à 14:15

Watael

Re : [RESOLU] uptime & stats sur le long terme (ubuntu server)

tout simplement.


Connected \o/
Welcome to sHell. · eval is evil.

En ligne