X7ROOT File Manager
Current Path:
/usr/libexec/anaconda
usr
/
libexec
/
anaconda
/
📁
..
📄
anaconda-pre-log-gen
(590 B)
📄
anaconda-yum
(16.51 KB)
📄
auditd
(6.98 KB)
📄
dd_extract
(15.53 KB)
📄
dd_list
(15.55 KB)
📄
log-capture
(1.24 KB)
📄
run-anaconda
(116 B)
📄
upd-updates
(2.55 KB)
📄
zram-stats
(1.21 KB)
📄
zramswapoff
(1.44 KB)
📄
zramswapon
(2.24 KB)
Editing: zram-stats
#!/bin/bash ## # Show stats for all (initialized) zram devices # Author: Nitin Gupta # stats=( "disksize" "num_reads" "num_writes" "invalid_io" # "discard" "notify_free" "zero_pages" "orig_data_size" "compr_data_size" "mem_used_total" ) function get_stat() { local _dev=$1 local _stat=$2 cat $dev/$_stat } function show_stat() { local _name=$1 local _val=$2 local _unit=$3 printf "%-16s %11d %s\n" "$_name:" "$_val" "$_unit" } #for dev in `find /sys/block -name 'zram*'`; do find /sys/block -name 'zram*' | while read dev; do orig=0 compr=0 total=0 is_init=$(get_stat $dev initstate) # Show stats only for initialized devices [ "$is_init" == 1 ] || continue echo "$dev" for stat in "${stats[@]}"; do val=$(get_stat $dev $stat) eval __$stat=$val # ex: __disksize=$disksize show_stat $stat $val done [ "$__orig_data_size" == "0" ] && continue; cratio=$(echo "print $__compr_data_size*100/$__orig_data_size" | python | tr -d '\n') show_stat "avg_compr_ratio" $cratio "%" # Memory wasted due to fragmentation, metadata overhead etc. ovhd=$(echo "print ($__mem_used_total - $__compr_data_size) * 100 / \ $__compr_data_size" | python | tr -d '\n') show_stat "mem_overhead" $ovhd "%" echo done
Upload File
Create Folder