procstat

package
v0.202.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package procstat parses /proc/<pid>/stat — the ONE parser muster-mirror has: the process table the locators and the paste guard read (internal/mirrorhost).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stat

type Stat struct {
	// Comm is the process name (field 2, without its parentheses).
	Comm string
	// State is field 3 ("S", "R", "Z" for a zombie, …).
	State string
	// PPID is field 4.
	PPID int
	// TTY is field 7, tty_nr: the controlling terminal's device number, 0
	// for none (a process that called setsid, a daemon). 0 also when the
	// line is too short to hold it.
	TTY int
	// Start is field 22, the start time in clock ticks since boot, as
	// written: what tells a live process from a reused pid. "" when absent.
	Start string
}

Stat is the little of a stat line muster-mirror reads.

func Parse

func Parse(stat []byte) (Stat, bool)

Parse reads a stat line. comm can hold spaces and ')', so the fields after it are found from the LAST ')'. false for a line that is not one.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL