-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check /proc/uptime while waiting for systemd services to restart
- Loading branch information
Showing
4 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* File: | ||
* proc_uptime.scr | ||
* Summary: | ||
* SCR Agent for reading /proc/uptime | ||
* Access: | ||
* read | ||
* Authors: | ||
* Imobach Gonzalez Sosa <igonzalezsosa@suse.com> | ||
* | ||
* Example: /proc/uptime | ||
* 684141.86 683056.34 | ||
* | ||
* ... | ||
** | ||
* Read(.proc.uptime) | ||
* ([ $["uptime": 684141.86, "idle": 683056.34] ]) | ||
*/ | ||
|
||
.proc.uptime | ||
|
||
`ag_anyagent( | ||
`Description( | ||
(`File("/proc/uptime")), // filename | ||
"#\n", // Comment | ||
true, // Read-only | ||
( | ||
`Tuple( | ||
`uptime(`Float()), // Wall clock since boot | ||
`Whitespace(), | ||
`idle(`Float()) // Combined idle time of all cpus | ||
) | ||
) | ||
) | ||
) |