Sys.ps | R Documentation |
These functions return process id and status information, typically about the running R process.
Sys.ps(process= Sys.getpid(),
fields = c("pid", "pcpu", "time", "vsz", "comm"),
usefile = length(fields) > 10,
ps.cmd = Sys.ps.cmd(),
verbose = getOption("verbose"),
warn.multi = verbose || any(fields != "ALL"))
Sys.sizes(process = Sys.getpid(), ps.cmd = Sys.ps.cmd())
process |
the process id, an integer. |
fields |
character strings of |
usefile |
logical; if true, |
ps.cmd |
character string, giving the “ps” command name to be used. |
verbose |
logical ... |
warn.multi |
logical ... |
Use man ps
on your respective Unix system, to see what fields are
supported exactly. Unix dialects do differ here, and,
SunOS-Solaris even has more than one ps command...
Note, that Sys.sizes()
currently returns two integers which are
“common” to Solaris and Linux.
Martin Maechler
Sys.info
, Sys.getpid
,
proc.time
.
(.pid <- Sys.getpid()) ## process ID of current process
Sys.sizes(.pid)
## The default process statistics about the running R process
try( Sys.ps() )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.