How do you get total amount of RAM memory Linux has using Scala
Carlos Saltos

Carlos Saltos @csaltos

About: I code in Scala, Elm, Python and Ruby. Now trying to learn Haskell, Rust, Gleam and OCaml

Location:
Buenos Aires, Argentina
Joined:
Jun 30, 2020

How do you get total amount of RAM memory Linux has using Scala

Publish Date: Jan 4 '22
0 0

What ?

A simple Scala program to get the total RAM on a Linux machine

Why ?

Because I want to check from SBT if there is enough total RAM memory to run certain compilation options and I would like to share with others

How ?

Just go to https://github.com/csaltos/mem-on-linux-scala/blob/main/MemOnLinux.scala and copy paste the code, you can use it as bytes or gigabytes or filter for other memory options like memory free or available memory.

Comments 0 total

    Add comment