Skip to content

Instantly share code, notes, and snippets.

@tsunejui
Last active December 6, 2023 09:27
Show Gist options
  • Save tsunejui/bef3ee473bfb759243e7c60261c73143 to your computer and use it in GitHub Desktop.
Save tsunejui/bef3ee473bfb759243e7c60261c73143 to your computer and use it in GitHub Desktop.

Process Review Command

ps -o pid,pidns,netns,mntns,ipcns,utsns,userns,args -p <pid>: take a look the details of the process

ps -o thcount <pid>: To get the number of threads for a given pid:

Podman Process

Placeholder list:

Placeholder Description
.AutoRemove If true, containers are removed on exit
.CIDFile Container ID File
.Command Quoted command used
.Created Creation time for container, Y-M-D H:M:S
.CreatedAt Creation time for container (same as above)
.CreatedHuman Creation time, relative
.ExitCode Container exit code
.Exited “true” if container has exited
.ExitedAt Time (epoch seconds) that container exited
.ID Container ID
.Image Image Name/ID
.ImageID Image ID
.IsInfra “true” if infra container
.Labels All the labels assigned to the container
.Mounts Volumes mounted in the container
.Names Name of container
.Networks Show all networks connected to the container
.Pid Process ID on host system
.Pod Pod the container is associated with (SHA)
.PodName Seems to be empty no matter what
.Ports Exposed ports
.Restarts Display the container restart count
.RunningFor Time elapsed since container was started
.Size Size of container
.StartedAt Time (epoch seconds) the container started
.State Human-friendly description of ctr state
.Status Status of container

To generate the systemd files using podman:

podman generate systemd --name <your container name> --new

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment