Skip to content

- make cachestat compatible with older bash versions#37

Open
Sinnohd wants to merge 2 commits intobrendangregg:masterfrom
Sinnohd:master
Open

- make cachestat compatible with older bash versions#37
Sinnohd wants to merge 2 commits intobrendangregg:masterfrom
Sinnohd:master

Conversation

@Sinnohd
Copy link

@Sinnohd Sinnohd commented Sep 8, 2015

Older versions of bash are not supporting the printf %(FORMAT)T format. I quickly added a date based subtraction.

If someone has time, he can also implement a version check and use the printf with newer bash versions (less overhead) and the date part with older.

@brendangregg
Copy link
Owner

Thank you, but no. I object to performance tools that themselves waste performance without a really good reason. This change would do an extra fork/exec for every interval. I understand the reason, but I don't think it's a really good one. I'd also not be that interested in code that checked the bash version and then made an appropriate choice -- obfuscating the script, without a really good reason.

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

Successfully merging this pull request may close these issues.

2 participants