Stop SIGFPE on vmstat at times
Certain setups can crash vmstat with a SIGFPE, this small patch catches those events Bug-Debian: http://bugs.debian.org/677903
This commit is contained in:
parent
ff6c8aad3e
commit
64fa889816
2
vmstat.c
2
vmstat.c
@ -258,6 +258,7 @@ static void new_format(void)
|
|||||||
diow = *cpu_iow;
|
diow = *cpu_iow;
|
||||||
dstl = *cpu_zzz;
|
dstl = *cpu_zzz;
|
||||||
Div = duse + dsys + didl + diow + dstl;
|
Div = duse + dsys + didl + diow + dstl;
|
||||||
|
if (!Div) Div = 1, didl = 1;
|
||||||
divo2 = Div / 2UL;
|
divo2 = Div / 2UL;
|
||||||
printf(format,
|
printf(format,
|
||||||
running, blocked,
|
running, blocked,
|
||||||
@ -312,6 +313,7 @@ static void new_format(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Div = duse + dsys + didl + diow + dstl;
|
Div = duse + dsys + didl + diow + dstl;
|
||||||
|
if (!Div) Div = 1, didl = 1;
|
||||||
divo2 = Div / 2UL;
|
divo2 = Div / 2UL;
|
||||||
printf(format,
|
printf(format,
|
||||||
running,
|
running,
|
||||||
|
Loading…
Reference in New Issue
Block a user