On Linux, we can cat the file "/proc/meminfo" to display memory related information:
$ cat /proc/memoinfo
MemTotal: 32939372 kB
MemFree: 31155452 kB
MemAvailable: 31269760 kB
Buffers: 242964 kB
Cached: 200756 kB
SwapCached: 10472 kB
Active: 853936 kB
Inactive: 630008 kB
Active(anon): 569276 kB
Inactive(anon): 467960 kB
Active(file): 284660 kB
Inactive(file): 162048 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 1048572 kB
SwapFree: 829436 kB
Dirty: 24 kB
Writeback: 0 kB
AnonPages: 1037860 kB
Mapped: 91908 kB
Shmem: 376 kB
Slab: 176904 kB
SReclaimable: 75392 kB
SUnreclaim: 101512 kB
KernelStack: 7360 kB
PageTables: 20676 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 17518256 kB
Committed_AS: 3736228 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 812896 kB
DirectMap2M: 32741376 kB
DirectMap1G: 2097152 kB
We can grep a keyword and print the value using awk text filter. For example, the following BASH function allows you to extract the memory information with a key:
#!/bin/bash
function get_mem_info () {
local key="$1"
local val=$(cat /proc/meminfo | grep "$key" | awk -F ' ' '{ print $2; }')
echo $val
}
get_mem_info $1
For example:
$ ./get_mem_info MemTotal
32939372
--EOF (The Ultimate Computing & Technology Blog) --
Reposted to Blog
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Thank you for reading ^^^^^^^^^^^^^^^
NEW! Following my Trail (Upvote or/and Downvote)
Follow me for topics of Algorithms, Blockchain and Cloud.
I am @justyy - a Steem Witness
https://steemyy.com
My contributions
- Video Downloader
- Steem Blockchain Tools
- Free Cryptos API
- VPS Database
- Computing Technology Blog
- A few useless tools
- And some other online software/tools
- Merge Files/Videos
- LOGO Turtle Programming Chrome Extension
- Teaching Kids Programming - Youtube Channel and All Contents
Delegation Service
Important Update of Delegation Service!
Support me
If you like my work, please:
- Buy Me a Coffee, Thanks!
- Become my Sponsor, Thanks!
- Voting for me:
https://steemit.com/~witnesses type in justyy and click VOTE
- Delegate SP: https://steemyy.com/sp-delegate-form/?delegatee=justyy
- Vote @justyy as Witness: https://steemyy.com/witness-voting/?witness=justyy&action=approve
- Set @justyy as Proxy: https://steemyy.com/witness-voting/?witness=justyy&action=proxy
Alternatively, you can vote witness or set proxy here: https://steemit.com/~witnesses
Hi @justyy sir,
I missed the daily vote for 2 of my daily posts.
https://steemit.com/hive-175254/@besticofinder/smart-grid-network-architecture
https://steemit.com/hive-140217/@besticofinder/played-this-game-after-a-decade-age-of-empires
Please kindly check. And I set the proxy and please confirm whether I have done it right and eligible for bonus.
Thank you very much for the support. Have a good day !
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I voted you here.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you sir.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@tipu curate
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Upvoted 👌 (Mana: 5/9) Get profit votes with @tipU :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hi @justyy sir!
Sir i delegate 4115 Sp to you but receive just 9.44% vote daily.
I checked many delegator that delegate 3000 to 3500 sp but they receive more than 10% vote.
Sir what rules that i need to follow. Can you guide it ??
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
set a proxy to me
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Done Sir @justyy
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit