Two Linux API added: uptime and cal


uptime

uptime returns the server load average for the past 1, 5, and 15 minutes (if no parameters is given). It also returns the system uptime, so it may look like this:

1
 21:49:27 up 4 days, 23:38,  2 users,  load average: 0.22, 0.27, 0.16
 21:49:27 up 4 days, 23:38,  2 users,  load average: 0.22, 0.27, 0.16

It supports the following switches:

1
2
3
4
5
6
7
8
9
10
Usage:
 uptime [options]
 
Options:
 -p, --pretty   show uptime in pretty format
 -h, --help     display this help and exit
 -s, --since    system up since
 -V, --version  output version information and exit
 
For more details see uptime(1).
Usage:
 uptime [options]

Options:
 -p, --pretty   show uptime in pretty format
 -h, --help     display this help and exit
 -s, --since    system up since
 -V, --version  output version information and exit

For more details see uptime(1).
1
2
3
4
root@uploadbeta:/run/blog/cache8# uptime -p
up 4 days, 23 hours, 38 minutes
root@uploadbeta:/run/blog/cache8# uptime -s
2015-06-23 22:11:25
root@uploadbeta:/run/blog/cache8# uptime -p
up 4 days, 23 hours, 38 minutes
root@uploadbeta:/run/blog/cache8# uptime -s
2015-06-23 22:11:25

The API call address: https://helloacm.com/api/uptime/
Parameters, p=-p or p=-h or p=-V or p=-s
Return JSON format string

cal

cal is the inbuilt linux tool for generating the calendar. The default without any parameters gives you the current calendar months.

The API page: https://helloacm.com/cal/
The API call address: https://helloacm.com/api/cal/

Example usage using JSON/JQuery can be found here.

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
278 words
Last Post: The Best Efficient Anti-Spam PHP Code Detection for WordPress
Next Post: How to Check System Load Average under Linux?

The Permanent URL is: Two Linux API added: uptime and cal

Leave a Reply