Commit graph

27 commits

Author SHA1 Message Date
Casper da Costa-Luis d11d0b6c7a
ps -aux => ps aux 2024-10-06 20:53:57 +01:00
johnnymatthews 88fbb1f21f Adds MacOS-specfic ps aux command.
Potentially closes https://github.com/tmux-plugins/tmux-cpu/issues/89
2024-08-31 11:48:03 -03:00
Camille TJHOA 00ab1d2cda
Add CI linting (#72)
Co-authored-by: Casper da Costa-Luis <casper.dcl@physics.org>
2021-10-23 18:18:55 +01:00
Casper da Costa-Luis b8d75f6000
add cached eval
- fixes #27
- related #15
- related #5
2020-07-10 00:22:16 +01:00
Camille TJHOA 0e6fb34a3e Add new "cpu_percentage_format" & "gpu_percentage_format" option 2019-10-11 14:37:28 +00:00
Camille TJHOA 5aa3b34a62 Add editorconfig 2019-10-11 09:15:38 +00:00
Casper da Costa-Luis 4b9267164a remove extraneous spacing
- uses %3.1f for all CPU stats
- fixes #25
2019-02-26 15:10:02 +01:00
Camille TJHOA 12f7a74e25
Fix #21
Remove empty lines which cause issue with some version of `iostat`. See #21 for more details.
2018-01-19 08:42:24 +00:00
Sebastian Müller 3fae872d2a Replace , with . in cpu-load for German systems 2017-08-05 00:47:16 +02:00
Camille TJHOA 6281a72355 Fix #14 2016-10-10 20:45:58 +02:00
Camille TJHOA 4365837368 Fix #13 + Remove magic numbers 2016-07-03 18:01:50 +02:00
Daniele Sluijters 1120ecbd08 cpu_percentage: Cut right field from iostat on OS X
Closes #11.
2016-03-08 19:22:46 +01:00
Camille TJHOA 585c254b15 Fix #10 2016-03-03 21:50:36 +01:00
Camille TJHOA d5681daf91 Fix awk printf and BSD 2016-02-24 20:42:26 +01:00
Camille TJHOA a67251af94 Improve accuracy and add sar support 2016-02-24 14:15:15 +01:00
Camille TJHOA 1eb2fcc9f8 Fix #8 2016-01-31 16:33:25 +01:00
Camille TJHOA f44f77674d Better iostat support 2016-01-20 00:38:13 +01:00
Marius Schuller 573c98e5d9 use correct value if running on FreeBSD
Signed-off-by: Marius Schuller <marius.schuller@googlemail.com>
2016-01-13 20:08:15 +01:00
kiririmode 89d0a5982c determines correctly whether cygwin is used or not. 2015-02-07 19:49:00 +09:00
Camille TJHOA dfdf2ffa51 Fix variable size 2015-02-06 10:44:34 +01:00
Camille TJHOA 00d4e982f7 Add cygwin support 2015-01-29 18:37:18 +01:00
Larry Glenn 145a3d2c2b Force number of devices to 1 so as not to break the awk script.
The awk snippet that grabs the cpu stats assumes that there's one disk
in iostat's output. Adding -n 1 to the iostat call ensures that iostat
will only report on one disk, and the cpu stats will be in the correct
column.
2014-12-14 18:33:26 -05:00
Larry Glenn a3ed1dae1a Whoops, fix formatting 2014-12-08 23:04:03 -05:00
Larry Glenn a8fcdae801 Grab CPU stats from iostat on a mac
OSX doesn't have procfs, so grabbing cpu usage from /proc/stat won't
work.

Rather, if is_osx() returns true, get stats from the output of the
iostat utility.

Note that the first line of data that iostat prints is always averaged
over system uptime. You need to tell it to print two lines, averaging
over one second, and use the data in the second line.
2014-12-08 22:54:41 -05:00
Camille TJHOA 2f95c985b5 Limit decimal to 1 2014-12-07 17:58:54 +01:00
Camille TJHOA c66fd296c9 Fix interpolation 2014-11-30 17:06:45 +01:00
Camille TJHOA 09ddceb8ee First commit 2014-11-22 18:25:24 +01:00