Skip to content

Commit e1f6053

Browse files
committed
added --format examples for manpages
Signed-off-by: Raghul-M <raghul.m1430@gmail.com>
1 parent dafc0c4 commit e1f6053

File tree

5 files changed

+201
-1
lines changed

5 files changed

+201
-1
lines changed

docs/source/markdown/podman-farm-list.1.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,45 @@ Name Connections Default ReadWrite
3434
farm1 [f38 f37] false true
3535
farm2 [f37] true true
3636
```
37+
Show farms in JSON format:
38+
```
39+
$ podman farm list --format json
40+
[
41+
{
42+
"Name": "farm1",
43+
"Connections": [
44+
"f38",
45+
"f37"
46+
],
47+
"Default": false,
48+
"ReadWrite": true
49+
},
50+
{
51+
"Name": "farm2",
52+
"Connections": [
53+
"f37"
54+
],
55+
"Default": true,
56+
"ReadWrite": true
57+
}
58+
]
59+
```
3760

61+
Show only farm names:
62+
```
63+
$ podman farm list --format "{{.Name}}"
64+
farm1
65+
farm2
66+
```
67+
68+
Show detailed farm information:
69+
```
70+
$ podman farm list --format "Farm: {{.Name}} (Default: {{.Default}}, ReadWrite: {{.ReadWrite}})\nConnections: {{.Connections}}"
71+
Farm: farm1 (Default: false, ReadWrite: true)
72+
Connections: [f38 f37]
73+
Farm: farm2 (Default: true, ReadWrite: true)
74+
Connections: [f37]
75+
```
3876
## SEE ALSO
3977
**[podman(1)](podman.1.md)**, **[podman-farm(1)](podman-farm.1.md)**
4078

docs/source/markdown/podman-machine-inspect.1.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,73 @@ Print usage statement.
4646
Inspect the specified Podman machine.
4747
```
4848
$ podman machine inspect podman-machine-default
49+
[
50+
{
51+
"ConfigDir": {
52+
"Path": "/Users/jacksparrow/.config/containers/podman/machine/applehv"
53+
},
54+
"ConnectionInfo": {
55+
"PodmanSocket": {
56+
"Path": "/var/folders/9r/n3056v597wv2cq8s2j80bdnw0000gn/T/podman/podman-machine-default-api.sock"
57+
},
58+
"PodmanPipe": null
59+
},
60+
"Created": "2025-02-11T14:12:48.231836+05:30",
61+
"LastUp": "2025-08-12T19:31:19.391294+05:30",
62+
"Name": "podman-machine-default",
63+
"Resources": {
64+
"CPUs": 6,
65+
"DiskSize": 100,
66+
"Memory": 6144,
67+
"USBs": []
68+
},
69+
"SSHConfig": {
70+
"IdentityPath": "/Users/jacksparrow/.local/share/containers/podman/machine/machine",
71+
"Port": 53298,
72+
"RemoteUsername": "core"
73+
},
74+
"State": "running",
75+
"UserModeNetworking": true,
76+
"Rootful": false,
77+
"Rosetta": true
78+
}
79+
]
80+
```
81+
82+
Show machine name and state:
83+
```
84+
$ podman machine inspect --format "{{.Name}}\t{{.State}}"
85+
podman-machine-default running
86+
```
87+
88+
Show machine resource information:
89+
```
90+
$ podman machine inspect --format "Machine: {{.Name}}\nCPUs: {{.Resources.CPUs}}\nMemory: {{.Resources.Memory}} bytes\nDisk: {{.Resources.DiskSize}} bytes"
91+
Machine: podman-machine-default
92+
CPUs: 6
93+
Memory: 6144 bytes
94+
Disk: 100 bytes
95+
```
96+
97+
Show machine configuration details:
98+
```
99+
$ podman machine inspect --format "{{.Name}}: {{.State}} (Rootful: {{.Rootful}}, User Networking: {{.UserModeNetworking}})"
100+
podman-machine-default: running (Rootful: false, User Networking: true)
101+
```
102+
103+
Show machine uptime information:
104+
```
105+
$ podman machine inspect --format "Created: {{.Created}}\nLast Up: {{.LastUp}}\nState: {{.State}}"
106+
Created: 2025-02-11 14:12:48.231836 +0530 IST
107+
Last Up: 2025-08-12 19:31:19.391294 +0530 IST
108+
State: running
109+
```
110+
111+
Show connection information:
112+
```
113+
$ podman machine inspect --format "Socket: {{.ConnectionInfo.PodmanSocket}}\nConfig Dir: {{.ConfigDir}}"
114+
Socket: {/var/folders/9r/n3056v597wv2cq8s2j80bdnw0000gn/T/podman/podman-machine-default-api.sock <nil>}
115+
Config Dir: {/Users/jacksparrow/.config/containers/podman/machine/applehv <nil>}
49116
```
50117

51118
## SEE ALSO

docs/source/markdown/podman-pod-inspect.1.md.in

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Valid placeholders for the Go template are listed below:
6363

6464
Inspect specified pod:
6565
```
66-
# podman pod inspect foobar
66+
$ podman pod inspect foobar
6767
[
6868
{
6969
"Id": "3513ca70583dd7ef2bac83331350f6b6c47d7b4e526c908e49d89ebf720e4693",
@@ -91,6 +91,35 @@ Inspect specified pod:
9191
}
9292
]
9393
```
94+
Show only pod name and state:
95+
```
96+
$ podman pod inspect --format "{{.Name}}\t{{.State}}" mypod
97+
mypod Running
98+
```
99+
100+
Show pod ID and number of containers:
101+
```
102+
$ podman pod inspect mypod --format "Pod {{.Name}} ({{.ID}}) has {{.NumContainers}} containers"
103+
Pod mypod (605f5f776e101a6e0ad11ea802cae25eabf299da77122f2963fa65dc6ccf6717) has 2 containers
104+
```
105+
Show pod creation time and shared namespaces:
106+
```
107+
$ podman pod inspect mypod --format "Created: {{.Created}}\nShared: {{.SharedNamespaces}}"
108+
Created: 2025-08-14 21:16:05.861363099 +0530 IST
109+
Shared: [net uts ipc]
110+
```
111+
112+
Show pod resource limits:
113+
```
114+
$ podman pod inspect --format "Memory: {{.MemoryLimit}}, CPU Period: {{.CPUPeriod}}, CPU Quota: {{.CPUQuota}}" mypod
115+
Memory: 1073741824, CPU Period: 100000, CPU Quota: 50000
116+
```
117+
118+
Show container IDs within the pod:
119+
```
120+
$ podman pod inspect --format "{{range .Containers}}{{.Id}}: {{.State}} {{end}}" mypod
121+
e907f7902decca9d6b600b4d3cca9541d9b89dd726b2af7ad2eba05d2a97083f: running c5a53050a31aed71c55cb6a31b9564c69a1009f77750f3f0e8093bd98fcd8918: running
122+
```
94123

95124
## SEE ALSO
96125
**[podman(1)](podman.1.md)**, **[podman-pod(1)](podman-pod.1.md)**, **[podman-inspect(1)](podman-inspect.1.md)**

docs/source/markdown/podman-system-connection-list.1.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,50 @@ Name URI Identity Defau
3939
deva ssh://root@example.com:/run/podman/podman.sock ~/.ssh/id_rsa true true
4040
devb ssh://user@example.com:/run/user/1000/podman/podman.sock ~/.ssh/id_rsa false true
4141
```
42+
Show connections in JSON format:
43+
```
44+
$ podman system connection list --format json
45+
[
46+
{
47+
"Name": "podman-machine-default",
48+
"URI": "ssh://core@127.0.0.1:53298/run/user/501/podman/podman.sock",
49+
"Identity": "/Users/ragm/.local/share/containers/podman/machine/machine",
50+
"IsMachine": true,
51+
"Default": true,
52+
"ReadWrite": true
53+
},
54+
{
55+
"Name": "podman-machine-default-root",
56+
"URI": "ssh://root@127.0.0.1:53298/run/podman/podman.sock",
57+
"Identity": "/Users/ragm/.local/share/containers/podman/machine/machine",
58+
"IsMachine": true,
59+
"Default": false,
60+
"ReadWrite": true
61+
}
62+
]
63+
```
64+
Show connection names and URIs:
65+
```
66+
$ podman system connection list --format "{{.Name}}\t{{.URI}}"
67+
podman-machine-default ssh://core@127.0.0.1:53298/run/user/501/podman/podman.sock
68+
podman-machine-default-root ssh://root@127.0.0.1:53298/run/podman/podman.sock
69+
```
70+
Show all connection details in a comprehensive format:
71+
```
72+
$ podman system connection list --format "Name: {{.Name}}\nURI: {{.URI}}\nIdentity: {{.Identity}}\nDefault: {{.Default}}\nReadWrite: {{.ReadWrite}}\n---"
73+
Name: podman-machine-default
74+
URI: ssh://core@127.0.0.1:53298/run/user/501/podman/podman.sock
75+
Identity: /Users/ragm/.local/share/containers/podman/machine/machine
76+
Default: true
77+
ReadWrite: true
78+
---
79+
Name: podman-machine-default-root
80+
URI: ssh://root@127.0.0.1:53298/run/podman/podman.sock
81+
Identity: /Users/ragm/.local/share/containers/podman/machine/machine
82+
Default: false
83+
ReadWrite: true
84+
---
85+
```
4286
## SEE ALSO
4387
**[podman(1)](podman.1.md)**, **[podman-system(1)](podman-system.1.md)**, **[podman-system-connection(1)](podman-system-connection.1.md)**
4488

docs/source/markdown/podman-system-df.1.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,34 @@ Local Volumes space usage:
6666
6767
VOLUME NAME LINKS SIZE
6868
data 1 0B
69+
```
6970

71+
Show only the total count for each type:
72+
```
7073
$ podman system df --format "{{.Type}}\t{{.Total}}"
7174
Images 1
7275
Containers 5
7376
Local Volumes 1
7477
```
78+
Show disk usage in JSON format:
79+
```
80+
$ podman system df --format json
81+
[
82+
{"Type":"Images","Total":12,"Active":3,"RawSize":13491151377,"RawReclaimable":922956674,"TotalCount":12,"Size":"13.49GB","Reclaimable":"923MB (7%)"},
83+
{"Type":"Containers","Total":4,"Active":0,"RawSize":209266,"RawReclaimable":209266,"TotalCount":4,"Size":"209.3kB","Reclaimable":"209.3kB (100%)"},
84+
{"Type":"Local Volumes","Total":6,"Active":1,"RawSize":796638905,"RawReclaimable":47800633,"TotalCount":6,"Size":"796.6MB","Reclaimable":"47.8MB (6%)"}
85+
]
86+
```
87+
Show type and size in a custom format:
88+
```
89+
$ podman system df --format "{{.Type}}: {{.Size}} ({{.Reclaimable}} reclaimable)"
90+
91+
Images: 13.49GB (923MB (7%) reclaimable)
92+
Containers: 209.3kB (209.3kB (100%) reclaimable)
93+
Local Volumes: 796.6MB (47.8MB (6%) reclaimable)
94+
```
95+
96+
7597
## SEE ALSO
7698
**[podman(1)](podman.1.md)**, **[podman-system(1)](podman-system.1.md)**
7799

0 commit comments

Comments
 (0)