Gehe zum Inhalt

fafanet

Zurück zu Blog
Full screen

uprecords

September 4, 2014 18:01 , von Unbekannt - 0no comments yet | No one following this article yet.
Viewed 372 times
Perguntaram: como checar o  "uptime" do sistema e como saber o record da máquina! Pergunta simples, resposta simples. Em sistemas GNU/Linux sempre existe mais de um modo, para diferentes usos. Se não tiver um modo que lhe agrade, você pode criar um! Seja criativo;

Então o uptime da máquina,  pode ser checado pelos comandos: "uptime", "top", "htop", "w" e o uprecords, sendo que pelo último, temos o uptime e o record, tudo no mesmo comando:

uprecords
Como o uprecords não faz parte do pacote coreutils, então precisa ser instalado. Em ambiente Debian, instale o pacote uprecords-cgi:

aptitude install uprecords-cgi


Encontrei também a dica (1)  abaixo que recebe os parâmetros do uptime e mosta em dias e minutos:

uptime | \
sed s/^.*up// | \
awk -F, '{ if ( $3 ~ /user/ ) { print $1 $2 } else { print $1 }}' | \
sed -e 's/:/\ hours\ /' -e 's/ min//' -e 's/$/\ minutes/' | \
sed 's/^ *//'
Referências:
man uptime
man top
man htop
man w
man uprecords
(1)  http://www.cyberciti.biz/faq/server-uptime-command-to-find-out-how-long-the-system-has-been-running/
Quelle: http://feedproxy.google.com/~r/silvaetibr/~3/GmsPeAgS4mw/uprecords.html

0no comments yet

    Einen Kommentar schreiben

    The highlighted fields are mandatory.

    Wenn Sie ein registrierter Nutzer sind, dann können Sie sich anmelden und automatisch unter Ihrem Namen arbeiten.

    Abbrechen

    fafanet

    fafanet timeline

    redirection forbidden: http://identi.ca/api/statuses/user_timeline/48009.rss -> https://identi.ca/api/statuses/user_timeline/48009.rss

    Mein Netzwerk

    0 Communities

    keine