mirror of https://github.com/xzeldon/htop.git
htop crashes on Solaris 11.4 due to missing ZFS ARC kstats
This commit is contained in:
parent
5ea13e7ea9
commit
543286256e
|
@ -213,19 +213,19 @@ static inline void SolarisProcessList_scanZfsArcstats(ProcessList* pl) {
|
||||||
spl->zfs.max = cur_kstat->value.ui64 / 1024;
|
spl->zfs.max = cur_kstat->value.ui64 / 1024;
|
||||||
|
|
||||||
cur_kstat = kstat_data_lookup( arcstats, "mfu_size" );
|
cur_kstat = kstat_data_lookup( arcstats, "mfu_size" );
|
||||||
spl->zfs.MFU = cur_kstat->value.ui64 / 1024;
|
spl->zfs.MFU = cur_kstat != NULL ? cur_kstat->value.ui64 / 1024 : 0;
|
||||||
|
|
||||||
cur_kstat = kstat_data_lookup( arcstats, "mru_size" );
|
cur_kstat = kstat_data_lookup( arcstats, "mru_size" );
|
||||||
spl->zfs.MRU = cur_kstat->value.ui64 / 1024;
|
spl->zfs.MRU = cur_kstat != NULL ? cur_kstat->value.ui64 / 1024 : 0;
|
||||||
|
|
||||||
cur_kstat = kstat_data_lookup( arcstats, "anon_size" );
|
cur_kstat = kstat_data_lookup( arcstats, "anon_size" );
|
||||||
spl->zfs.anon = cur_kstat->value.ui64 / 1024;
|
spl->zfs.anon = cur_kstat != NULL ? cur_kstat->value.ui64 / 1024 : 0;
|
||||||
|
|
||||||
cur_kstat = kstat_data_lookup( arcstats, "hdr_size" );
|
cur_kstat = kstat_data_lookup( arcstats, "hdr_size" );
|
||||||
spl->zfs.header = cur_kstat->value.ui64 / 1024;
|
spl->zfs.header = cur_kstat != NULL ? cur_kstat->value.ui64 / 1024 : 0;
|
||||||
|
|
||||||
cur_kstat = kstat_data_lookup( arcstats, "other_size" );
|
cur_kstat = kstat_data_lookup( arcstats, "other_size" );
|
||||||
spl->zfs.other = cur_kstat->value.ui64 / 1024;
|
spl->zfs.other = cur_kstat != NULL ? cur_kstat->value.ui64 / 1024 : 0;
|
||||||
|
|
||||||
if ((cur_kstat = kstat_data_lookup( arcstats, "compressed_size" )) != NULL) {
|
if ((cur_kstat = kstat_data_lookup( arcstats, "compressed_size" )) != NULL) {
|
||||||
spl->zfs.compressed = cur_kstat->value.ui64 / 1024;
|
spl->zfs.compressed = cur_kstat->value.ui64 / 1024;
|
||||||
|
|
Loading…
Reference in New Issue