Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F25451881
process.go
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
744 B
Referenced Files
None
Subscribers
None
process.go
View Options
package
process
type
Process
struct
{
User
string
Pid
int64
CPU
float64
VSZ
int64
RSS
int64
Command
string
}
// Parses from two string slices given by Docker API
func
Parse
(
processLabels
[]
string
,
processInfo
[]
string
)
Process
{
process
:=
Process
{}
for
i
,
processInfoPart
:=
range
processInfo
{
switch
processLabels
[
i
]
{
case
"USER"
:
process
.
User
=
processInfoPart
case
"PID"
:
process
.
Pid
=
ParseIntOrZero
(
processInfoPart
)
case
"%CPU"
:
process
.
CPU
=
ParseFloatOrZero
(
processInfoPart
)
case
"VSZ"
:
process
.
VSZ
=
ParseIntOrZero
(
processInfoPart
)
case
"RSS"
:
process
.
RSS
=
ParseIntOrZero
(
processInfoPart
)
case
"COMMAND"
:
process
.
Command
=
processInfoPart
}
}
return
process
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 16, 05:41 (1 d, 1 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3625996
Default Alt Text
process.go (744 B)
Attached To
Mode
rDP Docker Processes
Attached
Detach File
Event Timeline
Log In to Comment