Skip to main content
Chemistry LibreTexts

6: Disk and CPU

  • Page ID
    433294
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    Operations on CPU

    Number of CPUs

    To know how many CPUs the server has, use the command:

    • lscpu
    lscpu
    
    Output:

    clipboard_e2b3e7d2c83c1ec792a31e831da90c99f.png

     

    Operations on RAM

    To know how much RAM the server has, use the command:

    • free
    • free -b : b is for bytes
    • free -k : k is for kilo-bytes
    • free -m : m is for mega-bytes
    • free -g : g is for giga_bytes
    free
    free -b
    
    Output:

    clipboard_eaa53f5966b654ea0f106497afafcc1b7.png

     

    Used storage

    To know how much storage has been used from the disk, use the command:

    • du : disk usage
    Be careful!

    By using the du command by itself, be ready to get a big number of logs with all the files that exist on your disk!

    We will be discussing the options to get precise outputs using the du command in the following part.

     

    To know the storage usage of each folder, use the command:

    du -h --max-depth=1 ./
    
    Output:

    clipboard_e87e90398124ed7d93498b2932f359955.png

    d

    Free space

    To know how much free space is available for data, use the command:

    • df 

    To make the output easier to understand (in Kilobytes, Megabytes and Gigabytes), use the option -h (human-readable) with the df command

    To know the storage usage of each folder, use the command:

    df
    df -h
    
    Output:

    clipboard_e8a47ec3f08da23c3cd6832bd110975f0.png

     


    This page titled 6: Disk and CPU is shared under a not declared license and was authored, remixed, and/or curated by Robert Belford.

    • Was this article helpful?