Skip to content

tracking trends in usage #256

Answered by KSXGitHub
aae42 asked this question in Q&A
Discussion options

You must be logged in to vote

i wish pdu had the option of ignoring or not listing files, only directories

You may do something like pdu --json-output | prune-files | pdu --json-input (you are suppose to implement prune-files)

i was wondering what tracking changes to disk usage might look like

for example, imagine running pdu on a system hourly and dumping to json

to compare usage from one day to another, you compare the jsons with a semantic diffing tool

I'm not sure if this is what you'd like, but here's how I would do it (you are supposed to implement sort-pdu-output):

# run this on a schedule
pdu --json-output | sort-pdu-output | pdu --json-input > pdu-$(date -u +%Y-%m-%d).txt
# compare them
diff -u pdu-2024-0…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aae42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants