Description Usage Arguments Value Examples
View source: R/getProcessStatus.R
Returns a dataframe of information from the ps
command.
1 | getProcessStatus(psPath = "/bin/ps")
|
psPath |
Full path of the |
A dataframe of information from the ps
command.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
library(dplyr)
# CPU hogs
cpu_hogs <- getProcessStatus() %>%
select(pcpu,user) %>%
group_by(user) %>%
summarise(cpu_usage = sum(pcpu)) %>%
arrange(desc(cpu_usage))
head(cpu_hogs)
# Long processes
long_running <- getProcessStatus() %>%
select(user, esecs, pid, command) %>%
filter(user != "root") %>%
arrange(desc(esecs))
head(long_running)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.