This will be a very dumb question to the gurus I'm guessing but here goes.
I am trying to keep track of the number of threads on my system and I need to add timestamp somewhere with each output.
Here is my current command to check number of threads :
watch -n1 'ps -eLo pid,cmd,nlwp | wc -l >> test.txt'
I would like the timestamp to be added on each line in test.txt as the number of threads gets written
How do I get the output to look like 2020-12-14 07:08:10 5431 (where 5431 is the number of threads) ?