59 |
|
#define THRESHOLD_WARN_DISK 75.0 |
60 |
|
#define THRESHOLD_ALERT_DISK 90.0 |
61 |
|
|
62 |
+ |
int sig_winch_flag = 0; |
63 |
+ |
|
64 |
|
typedef struct{ |
65 |
|
sg_cpu_percents *cpu_percents; |
66 |
|
sg_mem_stats *mem_stats; |
534 |
|
} |
535 |
|
|
536 |
|
void sig_winch_handler(int dummy){ |
537 |
< |
clear(); |
536 |
< |
display_headings(); |
537 |
< |
display_data(0); |
537 |
> |
sig_winch_flag = 1; |
538 |
|
signal(SIGWINCH, sig_winch_handler); |
539 |
|
} |
540 |
|
|
676 |
|
get_stats(); |
677 |
|
} |
678 |
|
last_update = now; |
679 |
+ |
|
680 |
+ |
if(sig_winch_flag) { |
681 |
+ |
clear(); |
682 |
+ |
display_headings(); |
683 |
+ |
sig_winch_flag = 0; |
684 |
+ |
} |
685 |
|
|
686 |
|
display_data(colouron); |
687 |
|
} |