Documentation ¶
Index ¶
Constants ¶
const ( StatsDump = "stats-dump" StatsRestore = "stats-restore" )
Variables ¶
This section is empty.
Functions ¶
func GetDumpStats ¶ added in v6.1.0
func GetDumpStats(dir string) (*images.DumpStatsEntry, error)
GetDumpStats returns the dump statistics of a checkpoint. dir is the path to the directory with the checkpoint images.
func GetRestoreStats ¶ added in v6.1.0
func GetRestoreStats(dir string) (*images.RestoreStatsEntry, error)
GetRestoreStats returns the restore statistics of a checkpoint. dir is the path to the directory with the checkpoint images.
Types ¶
type CritSvc ¶
type CritSvc interface { // Read binary image file into Go struct (decode.go) Decode() (*CriuImage, error) // Read only counts of image file entries into Go struct Info() (*CriuImage, error) // Read JSON into Go struct Parse() (*CriuImage, error) // Write JSON to binary image file (encode.go) Encode(*CriuImage) error // Explore process information (explore.go) ExplorePs() (*PsTree, error) ExploreFds() ([]*Fd, error) ExploreMems() ([]*MemMap, error) ExploreRss() ([]*RssMap, error) }
CritSvc is the interface that wraps all CRIT operations. To create a CRIT service instance, use New().
type CriuEntry ¶
CriuEntry represents a single entry in an image
func (*CriuEntry) MarshalJSON ¶
MarshalJSON is the marshaler for CriuEntry. This is required as protojson.Marshal is used for the proto.Message, and any extra data is manually appended to the entry
type CriuImage ¶
CriuImage represents a CRIU binary image file
func (*CriuImage) UnmarshalJSON ¶
UnmarshalJSON is the unmarshaler for CriuImage. This is required as the object must be checked for any extra data, which must be removed from the JSON byte stream before unmarshaling the remaining bytes into a proto.Message object
type Mem ¶
type Mem struct { Start string `json:"start"` End string `json:"end"` Protection string `json:"protection"` Resource string `json:"resource,omitempty"` }
Mem represents the memory mapping of a single file
type MemMap ¶
type MemMap struct { PId uint32 `json:"pId"` Exe string `json:"exe"` Mems []*Mem `json:"mems,omitempty"` }
MemMap represents the memory mapping of a single process
type PsTree ¶
type PsTree struct { PId uint32 `json:"pId"` PgId uint32 `json:"pgId"` SId uint32 `json:"sId"` Comm string `json:"comm"` Process *images.PstreeEntry `json:"-"` Core *images.CoreEntry `json:"-"` Children []*PsTree `json:"children,omitempty"` }
PsTree represents the process tree
type Rss ¶
type Rss struct { PhyAddr string `json:"phyAddr,omitempty"` PhyPages int64 `json:"phyPages,omitempty"` Vmas []*Vma `json:"vmas,omitempty"` Resource string `json:"resource,omitempty"` }
Rss represents a single resident set size mapping