查看容器logs及pids

  1. 選項 -l 查看最新容器,也就是web容器的 logs。
    [deyu5@kvm3 ~]$ podman logs -l
    AH00558: httpd: Could not reliably determine the server's fully qualified domain name,
    using 10.0.2.100. Set the 'ServerName' directive globally to suppress this message
    AH00558: httpd: Could not reliably determine the server's fully qualified domain name,
    using 10.0.2.100. Set the 'ServerName' directive globally to suppress this message
    [Wed Nov 10 09:57:27.595296 2021] [mpm_event:notice] [pid 1:tid 139859574541632] AH00489: 
    Apache/2.4.51 (Unix) configured -- resuming normal operations
    [Wed Nov 10 09:57:27.601007 2021] [core:notice] [pid 1:tid 139859574541632] AH00094: 
    Command line: 'httpd -D FOREGROUND'
    10.0.2.100 - - [10/Nov/2021:09:57:41 +0000] "GET / HTTP/1.1" 200 45
    
  2. 選項 -l 查看最新容器,也就是web容器的 pids。
    [deyu5@kvm3 ~]$ podman top -l
    USER        PID     PPID     %CPU      ELAPSED          TTY      TIME   COMMAND
    root        1       0        0.000     5m51.871245149s  pts/0    0s     httpd -DFOREGROUND
    daemon      7       1        0.000     5m50.873692516s  pts/0    0s     httpd -DFOREGROUND
    daemon      8       1        0.000     5m50.874019526s  pts/0    0s     httpd -DFOREGROUND
    daemon      9       1        0.000     5m50.874388708s  pts/0    0s     httpd -DFOREGROUND