momo zone

调核人的blog

ps 程序的一个细节

才发现 ps x 显示的CMD 指的可能是软链接文件名 ,而ps l   和ps -p <pid> 不会。比如:

有的发行版中已经用/bin/systemd 替代了/sbin/init 。并且设置了软链接 /sbin/init -> /bin/systemd

那么 ps -lp 1 显示的CMD是 systemd,而ps x 显示的CMD 是 init

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: