Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pidstat -h adds a # column that is not populated #365

Open
FryerPan opened this issue Jun 29, 2023 · 1 comment
Open

Pidstat -h adds a # column that is not populated #365

FryerPan opened this issue Jun 29, 2023 · 1 comment

Comments

@FryerPan
Copy link

When I use the -h option for pidstat, a # column is added at the left side of the output table. I assume that column is supposed to supply an index for each process. However, pidstat does not actually populate any values in this column, leaving whitespace to the left of the Time column values. If I try to parse this data using another program (in my case, awk), the data winds up being shifted to the left by one column.

I can add terminal snippets later for reference - I can't access GitHub from my Linux machine at the moment.

@sysstat
Copy link
Owner

sysstat commented Jun 30, 2023

The hash sign at the beginning of the header line is not intended to be considered as a column per se, but as a mark indicating that this line is not a line of statistics but a header line (displaying the various fields names).
It has the same meaning as the hash sign in, e.g., a shell script (the text which follows is a comment), making it easy to remove this line with a command like grep -v ^#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants