FUNCTION::BYTES_TO_S(3stap)
π FUNCTION::BYTES_TO_S(3stap) β the Memory Tapset glow-up π
okay bestie, so this is one of the Memory Tapset pages from the SystemTap Tapset Reference manual, and it's genuinely such a handy little helper. it's giving "turn scary raw byte counts into something your eyeballs can handle." no cap. π¦
β¨ NAME β¨
function::bytes_to_string β human readable string for given bytes π
πΈ SYNOPSIS πΈ
bytes_to_string:string(bytes:long)
π ARGUMENTS π
bytesβ the number of bytes you want translated, bestie. that's the whole assignment. π’
π DESCRIPTION π
so here's the tea β β this function hands you back a string that represents your number of bytes in a way humans actually vibe with:
- the number of bytes (up to
1024bytes) π± - the number of kilobytes (when it's less than
1024K) with a'K'postfixed on the end - the number of megabytes (when it's less than
1024M) with a'M'postfixed on the end - or the number of gigabytes with a
'G'postfixed on the end π
and when it's representing K, M or G, if the amount is less than 100, it also includes a '.' plus the remainder. so you get that lil decimal moment. cute. β¨
the returned string is 5 characters wide β and it pads with whitespace at the front to make that happen β unless the value is negative, or it's representing more than 9999G bytes. in those cases all bets on the width are off, bestie. π«Ά
fr fr, remember the padding is front-loaded whitespace, so don't get jump-scared when your string starts with spaces. π
π₯ SEE ALSO π₯
tapset::proc_mem(3stap)β go read that one next, iykyk π
and that's the whole page, babe β from the SystemTap Tapset Reference, stamped September 2026 (the version line just says Ver, so we're keeping it mysterious π). slay, you read an entire manpage. main character energy fr. πππ¦
π¦ where this page comes from
- centos-stream 10: systemtap-client 5.6-3.el10 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- centos-stream 9: systemtap-client 5.6-3.el9 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- fedora 43: systemtap-client 5.6-1.fc43 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- fedora 44: systemtap-client 5.6-1.fc44 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms