De acordo com as Leis 12.965/2014 e 13.709/2018, que regulam o uso da Internet e o tratamento de dados pessoais no Brasil, ao me inscrever na newsletter do portal DICAS-L, autorizo o envio de notificações por e-mail ou outros meios e declaro estar ciente e concordar com seus Termos de Uso e Política de Privacidade.
Colaboração: Rubens Queiroz de Almeida
Data de Publicação: 27 de outubro de 2015
O aplicativo de linha de comando tuptime oferece as seguintes informações em um sistema baseado no GNU/Linux:
$ cd /tmp $ git clone https://github.com/rfrail3/tuptime.git $ ls $ cd tuptime $ ls
Certifique-se de que o seu sistema possua o Python v2.7 com sys
,
optparse
, os
, re
, string
, sqlite3
, datetime
,
disutils
e módulos locale
.
Para instalar digite:
$ sudo sh ./tuptime-install.sh
Para instalar manualmente:
$ sudo cp /tmp/tuptime/latest/cron.d/tuptime /etc/cron.d/tuptime
Para sistemas com systemd
, copie o arquivo de serviço e habilite-o:
$ sudo cp /tmp/tuptime/latest/systemd/tuptime.service /lib/systemd/system/ $ sudo systemctl enable tuptime.service
Se o seu sistema não possuir systemd
, copie o arquivo de inicialização:
$ sudo cp /tmp/tuptime/latest/init.d/tuptime.init.d-debian7 /etc/init.d/tuptime $ sudo update-rc.d tuptime defaults
Depois de tudo pronto, para executar, digite:
$ sudo tuptime
System startups: 1 since 10:33:27 25-10-2015
System shutdowns: 0 ok - 0 bad
System uptime: 100.0 % - 2 hours, 48 minutes and 1 second
System downtime: 0.0 % - 0 seconds
System life: 2 hours, 48 minutes and 1 second
Largest uptime: 2 hours, 48 minutes and 1 second from 10:33:27 25-10-2015
Shortest uptime: 2 hours, 48 minutes and 1 second from 10:33:27 25-10-2015
Average uptime: 2 hours, 48 minutes and 1 second
Largest downtime: 0 seconds
Shortest downtime: 0 seconds
Average downtime: 0 seconds
Current uptime: 2 hours, 48 minutes and 1 second since 10:33:27 25-10-2015
Os valores ainda são iniciais, visto que a instalação foi feita recentemente.
Referência: Linux Server See the Historical and Statistical Uptime of System With tuptime Utility
This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
Comentários