Different issue than #597
Running on Valet on MacOS Mojave 10.14.4 - on a German system, and that's the issue.
exec ps axo %cpu,%mem,command returns something like
%CPU %MEM COMMAND
0,0 0,1 /sbin/launchd
0,0 0,0 /usr/sbin/syslogd
0,0 0,1 /usr/libexec/UserEventAgent (System)
The separator in German is a comma. Parsing that fails in SystemProcessCounter.
"3,4" / 100 ==> "PHP Notice: A non well formed numeric value encountered"
Use "float":
return ['cpu' => (float) $row->first() / 100, 'mem' => (float) $row->last()];
Duplicate of https://github.com/laravel/horizon/issues/597
As I stated, from my point of view it's another issue. #597 drifted towards Alpine - this is about a decimals separator other than ".".
Ping @AJenbo: can we use the solution from above?
Afaik it will loose precision, but I can probably either set the local for the command or do propper parsing of the local specific format to get the correct value. I plan to work on it today so this is good timing 馃檪
Thanks!
Same issue? https://github.com/laravel/horizon/pull/606
@tomswinkels I believe so.
Most helpful comment
Same issue? https://github.com/laravel/horizon/pull/606