Title: How to display process title by ps?
Tags: ps
Question: As per setproctitle(3), the process title appears on the ```ps``` command. But after looking up the ps(1), I still have no idea how to display it by ```ps```.

Comment: option `-o comm` will not give expected result ?

Comment: Many things can be learned by reading the fine manual. But it should be done on last resort…

Comment: As @Archemar wrote : Issue ps -eo args,comm,command and observe the misc ways to display the process name. I bet that the second column displays what you wish.

Comment: @Archemar and @MC68020 Now I figure out it. The process title is just displayed by option `-o cmd`...

Here is the accepted answer: Because ```setproctitle()``` indeed modifies the ```argv[0]``` of the calling process, so the process title can be displayed by ```ps -o cmd```.



{'source': 'StackExchangeDataset', 'subset': 'unix.stackexchange.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 4, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2022:00:04/15/22', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<ps>', 'Title': 'How to display process title by ps?', 'ViewCount': 120, 'id': 699133, 'user_AboutMe': "<p>I'm not a native English speaker, so anyone who correct words and grammar of my questions would be appreciated.</p>\n", 'user_AccountId': 20832448.0, 'user_DisplayName': 'Li-Guangda', 'user_Reputation': 203.0, 'user_Views': 4.0, 'user_id': 479151.0}}