MCPcopy Create free account
hub / github.com/prometheus/procfs / CmdLine

Method CmdLine

cmdline.go:23–30  ·  view source on GitHub ↗

CmdLine returns the command line of the kernel.

()

Source from the content-addressed store, hash-verified

21
22// CmdLine returns the command line of the kernel.
23func (fs FS) CmdLine() ([]string, error) {
24 data, err := parsers.ReadFileNoStat(fs.proc.Path("cmdline"))
25 if err != nil {
26 return nil, err
27 }
28
29 return strings.Fields(string(data)), nil
30}

Callers 1

TestCmdlineFunction · 0.95

Calls 2

ReadFileNoStatFunction · 0.92
PathMethod · 0.45

Tested by 1

TestCmdlineFunction · 0.76