Fig.01: Devotion to Duty https://xkcd.com/705/Fig.01: Devotion to Duty https://xkcd.com/705/
$ sudo apt-get install uptimed
Reading package lists... DoneBuilding dependency treeReading state information... DoneThe following additional packages will be installed:libuptimed0The following NEW packages will be installed:libuptimed0 uptimed0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.Need to get 40.7 kB of archives.After this operation, 228 kB of additional disk space will be used.Do you want to continue? [Y/n] yGet:1 http://mirrors.linode.com/ubuntu xenial/universe amd64 libuptimed0 amd64 1:0.3.17-4 [9,050 B]Get:2 http://mirrors.linode.com/ubuntu xenial/universe amd64 uptimed amd64 1:0.3.17-4 [31.6 kB]Fetched 40.7 kB in 0s (2,738 kB/s)Preconfiguring packages ...Selecting previously unselected package libuptimed0.(Reading database ... 39163 files and directories currently installed.)Preparing to unpack .../libuptimed0_1%3a0.3.17-4_amd64.deb ...Unpacking libuptimed0 (1:0.3.17-4) ...Selecting previously unselected package uptimed.Preparing to unpack .../uptimed_1%3a0.3.17-4_amd64.deb ...Unpacking uptimed (1:0.3.17-4) ...Processing triggers for systemd (229-4ubuntu21) ...Processing triggers for ureadahead (0.100.0-19) ...Processing triggers for man-db (2.7.5-1) ...Setting up libuptimed0 (1:0.3.17-4) ...Setting up uptimed (1:0.3.17-4) ...Processing triggers for libc-bin (2.23-0ubuntu9) ...Processing triggers for systemd (229-4ubuntu21) ...Processing triggers for ureadahead (0.100.0-19) ...
$ sudo yum install uptimed
Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile* base: centos.excellmedia.net* epel: ftp.cuhk.edu.hk* extras: centos.excellmedia.net* updates: centos.excellmedia.netResolving Dependencies--> Running transaction check---> Package uptimed.x86_64 0:0.4.0-6.el7 will be installed--> Finished Dependency ResolutionDependencies Resolved===============================================================================Package Arch Version Repository Size===============================================================================Installing:uptimed x86_64 0.4.0-6.el7 epel 47 kTransaction Summary===============================================================================Install 1 PackageTotal download size: 47 kInstalled size: 98 kIs this ok [y/d/N]: yDownloading packages:uptimed-0.4.0-6.el7.x86_64.rpm (专业提供视频软件下载)
47 kB 00:01Running transaction checkRunning transaction testTransaction test succeededRunning transactionInstalling : uptimed-0.4.0-6.el7.x86_64 1/1Verifying : uptimed-0.4.0-6.el7.x86_64 1/1Installed:uptimed.x86_64 0:0.4.0-6.el7Complete!
$ sudo dnf install uptimed
$ sudo pacman -S uptimed
$ sudo emerge --ask uptimed
$ sudo vim /etc/uptimed.conf
EMAIL=vivek@server1.cyberciti.biz
$ sudo systemctl enable uptimed
$ sudo systemctl start uptimed ## start it ##$ sudo systemctl stop uptimed ## stop it ##$ sudo systemctl restart uptimed ## restart it ##$ sudo systemctl status uptimed ## view status ##
● uptimed.service - uptime record daemonLoaded: loaded (/lib/systemd/system/uptimed.service; enabled; vendor preset: enabled)Active: active (running) since Thu 2017-11-09 17:49:14 UTC; 18min agoMain PID: 11137 (uptimed)CGroup: /system.slice/uptimed.service└─11137 /usr/sbin/uptimed -fNov 09 17:49:14 gfs04 systemd[1]: Started uptime record daemon.
Fig.02: uprecords in actionFig.02: uprecords in action
usage: uprecords [OPTION]...-? this help-a do not print ansi codes-b sort by boottime-B reverse sort by boottime-k sort by sysinfo-K reverse sort by sysinfo-d print downtime seen before every uptimes instead of system-c do not show current entry if not in top entries-f run continously in a loop-s do not print extra statistics-w wide output (more than 80 cols per line)-i INTERVAL use INTERVAL seconds for loop instead of 5, implies -f-m COUNT show a maximum of top COUNT entries instead of 10-M show next milestone-v version information
……