Lines Matching +full:0 +full:v

5 # For a definition of fields, or usage, use arcstat -v
46 # Fields have a fixed width. Every interval, we fill the "v"
47 # hash with its corresponding value (v[field]=value) using calculate().
237 fields, stats = fs[0], fs[1:]
251 v = {}
314 del k1[0:2]
315 del k2[0:2]
334 sys.exit(0)
341 sys.stderr.write("\t -v : List all possible field headers and definitions"
345 sys.stderr.write("\t -f : Specify specific fields to print (see -v)\n")
353 sys.stderr.write("\tarcstat -v\n")
377 v = (s-int(pd))*(s-int(meta))/s
378 cur["mfu_data_target"] = v / 65536 * caches_size / 65536
379 v = (s-int(pm))*int(meta)/s
380 cur["mfu_metadata_target"] = v / 65536 * caches_size / 65536
381 v = int(pd)*(s-int(meta))/s
382 cur["mru_data_target"] = v / 65536 * caches_size / 65536
383 v = int(pm)*int(meta)/s
384 cur["mru_metadata_target"] = v / 65536 * caches_size / 65536
408 def prettynum(sz, scale, num=0):
410 index = 0
421 width = sz - (0 if index == 0 else 1)
422 intlen = len("%.0f" % num) # %.0f rounds to nearest int
424 decimal = 0
433 global v
437 fmt = lambda col: prettynum(cols[col][0], cols[col][1], v[col])
439 fmt = lambda col: str(v[col])
452 fmt = lambda col: "%*s" % (cols[col][0], col)
467 return sz[0]
535 if opt in ('-v', '--verbose'):
550 sint = int(argv[0]) if argv else sint
551 count = int(argv[1]) if len(argv) > 1 else (0 if len(argv) > 0 else 1)
585 if len(invalid) > 0:
589 if len(incompat) > 0:
612 global v
615 v = dict()
616 v["time"] = time.strftime("%H:%M:%S", time.localtime())
617 v["hits"] = d["hits"] / sint
618 v["iohs"] = d["iohits"] / sint
619 v["miss"] = d["misses"] / sint
620 v["read"] = v["hits"] + v["iohs"] + v["miss"]
621 v["hit%"] = 100 * v["hits"] / v["read"] if v["read"] > 0 else 0
622 v["ioh%"] = 100 * v["iohs"] / v["read"] if v["read"] > 0 else 0
623 v["miss%"] = 100 - v["hit%"] - v["ioh%"] if v["read"] > 0 else 0
625 v["dhit"] = (d["demand_data_hits"] + d["demand_metadata_hits"]) / sint
626 v["dioh"] = (d["demand_data_iohits"] + d["demand_metadata_iohits"]) / sint
627 v["dmis"] = (d["demand_data_misses"] + d["demand_metadata_misses"]) / sint
629 v["dread"] = v["dhit"] + v["dioh"] + v["dmis"]
630 v["dh%"] = 100 * v["dhit"] / v["dread"] if v["dread"] > 0 else 0
631 v["di%"] = 100 * v["dioh"] / v["dread"] if v["dread"] > 0 else 0
632 v["dm%"] = 100 - v["dh%"] - v["di%"] if v["dread"] > 0 else 0
634 v["ddhit"] = d["demand_data_hits"] / sint
635 v["ddioh"] = d["demand_data_iohits"] / sint
636 v["ddmis"] = d["demand_data_misses"] / sint
638 v["ddread"] = v["ddhit"] + v["ddioh"] + v["ddmis"]
639 v["ddh%"] = 100 * v["ddhit"] / v["ddread"] if v["ddread"] > 0 else 0
640 v["ddi%"] = 100 * v["ddioh"] / v["ddread"] if v["ddread"] > 0 else 0
641 v["ddm%"] = 100 - v["ddh%"] - v["ddi%"] if v["ddread"] > 0 else 0
643 v["dmhit"] = d["demand_metadata_hits"] / sint
644 v["dmioh"] = d["demand_metadata_iohits"] / sint
645 v["dmmis"] = d["demand_metadata_misses"] / sint
647 v["dmread"] = v["dmhit"] + v["dmioh"] + v["dmmis"]
648 v["dmh%"] = 100 * v["dmhit"] / v["dmread"] if v["dmread"] > 0 else 0
649 v["dmi%"] = 100 * v["dmioh"] / v["dmread"] if v["dmread"] > 0 else 0
650 v["dmm%"] = 100 - v["dmh%"] - v["dmi%"] if v["dmread"] > 0 else 0
652 v["phit"] = (d["prefetch_data_hits"] + d["prefetch_metadata_hits"]) / sint
653 v["pioh"] = (d["prefetch_data_iohits"] +
655 v["pmis"] = (d["prefetch_data_misses"] +
658 v["pread"] = v["phit"] + v["pioh"] + v["pmis"]
659 v["ph%"] = 100 * v["phit"] / v["pread"] if v["pread"] > 0 else 0
660 v["pi%"] = 100 * v["pioh"] / v["pread"] if v["pread"] > 0 else 0
661 v["pm%"] = 100 - v["ph%"] - v["pi%"] if v["pread"] > 0 else 0
663 v["pdhit"] = d["prefetch_data_hits"] / sint
664 v["pdioh"] = d["prefetch_data_iohits"] / sint
665 v["pdmis"] = d["prefetch_data_misses"] / sint
667 v["pdread"] = v["pdhit"] + v["pdioh"] + v["pdmis"]
668 v["pdh%"] = 100 * v["pdhit"] / v["pdread"] if v["pdread"] > 0 else 0
669 v["pdi%"] = 100 * v["pdioh"] / v["pdread"] if v["pdread"] > 0 else 0
670 v["pdm%"] = 100 - v["pdh%"] - v["pdi%"] if v["pdread"] > 0 else 0
672 v["pmhit"] = d["prefetch_metadata_hits"] / sint
673 v["pmioh"] = d["prefetch_metadata_iohits"] / sint
674 v["pmmis"] = d["prefetch_metadata_misses"] / sint
676 v["pmread"] = v["pmhit"] + v["pmioh"] + v["pmmis"]
677 v["pmh%"] = 100 * v["pmhit"] / v["pmread"] if v["pmread"] > 0 else 0
678 v["pmi%"] = 100 * v["pmioh"] / v["pmread"] if v["pmread"] > 0 else 0
679 v["pmm%"] = 100 - v["pmh%"] - v["pmi%"] if v["pmread"] > 0 else 0
681 v["mhit"] = (d["prefetch_metadata_hits"] +
683 v["mioh"] = (d["prefetch_metadata_iohits"] +
685 v["mmis"] = (d["prefetch_metadata_misses"] +
688 v["mread"] = v["mhit"] + v["mioh"] + v["mmis"]
689 v["mh%"] = 100 * v["mhit"] / v["mread"] if v["mread"] > 0 else 0
690 v["mi%"] = 100 * v["mioh"] / v["mread"] if v["mread"] > 0 else 0
691 v["mm%"] = 100 - v["mh%"] - v["mi%"] if v["mread"] > 0 else 0
693 v["arcsz"] = cur["size"]
694 v["size"] = cur["size"]
695 v["c"] = cur["c"]
696 v["mfu"] = d["mfu_hits"] / sint
697 v["mru"] = d["mru_hits"] / sint
698 v["mrug"] = d["mru_ghost_hits"] / sint
699 v["mfug"] = d["mfu_ghost_hits"] / sint
700 v["unc"] = d["uncached_hits"] / sint
701 v["eskip"] = d["evict_skip"] / sint
702 v["el2skip"] = d["evict_l2_skip"] / sint
703 v["el2cach"] = d["evict_l2_cached"] / sint
704 v["el2el"] = d["evict_l2_eligible"] / sint
705 v["el2mfu"] = d["evict_l2_eligible_mfu"] / sint
706 v["el2mru"] = d["evict_l2_eligible_mru"] / sint
707 v["el2inel"] = d["evict_l2_ineligible"] / sint
708 v["mtxmis"] = d["mutex_miss"] / sint
709 v["ztotal"] = (d["zfetch_hits"] + d["zfetch_future"] + d["zfetch_stride"] +
711 v["zhits"] = d["zfetch_hits"] / sint
712 v["zahead"] = (d["zfetch_future"] + d["zfetch_stride"]) / sint
713 v["zpast"] = d["zfetch_past"] / sint
714 v["zmisses"] = d["zfetch_misses"] / sint
715 v["zmax"] = d["zfetch_max_streams"] / sint
716 v["zfuture"] = d["zfetch_future"] / sint
717 v["zstride"] = d["zfetch_stride"] / sint
718 v["zissued"] = d["zfetch_io_issued"] / sint
719 v["zactive"] = d["zfetch_io_active"] / sint
722 v["cachessz"] = cur["caches_size"]
724 fields, stats = fs[0], fs[1:]
732 v[colname] = cur[fieldval[0] + statval[0]]
734 v[colname + "%"] = 100 * v[colname] / \
735 v[group["percent"]] if v[group["percent"]] > 0 else 0
739 v["l2hits"] = d["l2_hits"] / sint
740 v["l2miss"] = d["l2_misses"] / sint
741 v["l2read"] = v["l2hits"] + v["l2miss"]
742 v["l2hit%"] = 100 * v["l2hits"] / v["l2read"] if v["l2read"] > 0 else 0
744 v["l2miss%"] = 100 - v["l2hit%"] if v["l2read"] > 0 else 0
745 v["l2asize"] = l2asize
746 v["l2size"] = cur["l2_size"]
747 v["l2bytes"] = d["l2_read_bytes"] / sint
748 v["l2wbytes"] = d["l2_write_bytes"] / sint
750 v["l2pref"] = cur["l2_prefetch_asize"]
751 v["l2mfu"] = cur["l2_mfu_asize"]
752 v["l2mru"] = cur["l2_mru_asize"]
753 v["l2data"] = cur["l2_bufc_data_asize"]
754 v["l2meta"] = cur["l2_bufc_metadata_asize"]
755 v["l2pref%"] = 100 * v["l2pref"] / l2asize if l2asize > 0 else 0
756 v["l2mfu%"] = 100 * v["l2mfu"] / l2asize if l2asize > 0 else 0
757 v["l2mru%"] = 100 * v["l2mru"] / l2asize if l2asize > 0 else 0
758 v["l2data%"] = 100 * v["l2data"] / l2asize if l2asize > 0 else 0
759 v["l2meta%"] = 100 * v["l2meta"] / l2asize if l2asize > 0 else 0
761 v["grow"] = 0 if cur["arc_no_grow"] else 1
762 v["need"] = cur["arc_need_free"]
763 v["free"] = cur["memory_free_bytes"]
764 v["avail"] = cur["memory_available_bytes"]
765 v["waste"] = cur["abd_chunk_waste_size"]
773 i = 0
774 count_flag = 0
777 if count > 0:
783 if i == 0:
795 i = 0 if i >= hdr_intr else i + 1