Labels

Monday, November 16, 2020

Sunday, November 15, 2020

Linux resource management tool Slurm

Slurm is a group utilities used for managing workloads on computer clusters.

Some clusters use Slurm as the batch queuing system and the scheduling mechanism.

Jobs are submitted to Slurm from a login node and Slurm handles scheduling these jobs on nodes.

sinfo -l command displays information about nodes and partitions.

sbatch job.sh submit a job where job.sh is the script you want to run.

scancel jobID cancels a job

squeue -u userID shows state of jobs


An example for job submit script, e.g., job.slurm 


Execute script

$ sbatch job.slurm


two examples interactive shell
$srun -n 1 --pty bash -i

$srun --mem=4096 --pty  /bin/bash --time=01:00:00

Wednesday, November 11, 2020

Show logged users in Linux

 There are few simple commands which can display who are logged in the Linux.

w

who

users

last

Typing one of these commands in the terminal, it will display the logged in users information.

Friday, October 23, 2020

Find the SD card in Chromebook linux beta terminal

step by step: 

a .   You should click the File and locate your SD card

b.    Right click the SD card catalog and select " share with linux"

c.     You can access your sd card content at /mnt/chromeos/removable/sdcard/.


Reference:

https://support.google.com/chromebook/thread/792757?hl=en

Monday, September 21, 2020

The derivation of sound speed

Consider the sound wave propagating through a pipe with cross-section area $A$. In time interval $dt$ it moves through a tube of length $dz=vdt$. In the steady state, the mass flow rate $dm/dt=\rho v A$ must be the same at the ends of the tube, therefore the mass flux $j=\rho v = const. \to v d\rho=-\rho dv$. The pressure-gradient force provides the acceleration and apply the Newton's second law,

\[ \rho \frac{dv}{dt} =-\frac{dP}{dz} \]

\[\to dP= -\rho\frac{dv}{dt}dz = -\rho \frac{dz}{dt}dv =(-\rho \frac{dv}{dt})v = v^2d\rho .\]

And therefore,

\[ v^2=\frac{dP}{d\rho} ,\]

where, $P$ is the gas pressure, $\rho$ is the density.

Reference:

https://en.wikipedia.org/wiki/Speed_of_sound#:~:text=The%20speed%20of%20sound%20is,a%20mile%20in%204.7%20s.

Thursday, September 17, 2020

Play open red alert on chromebook

 

Command & Conquer: Red Alert is a real-time strategy game of the Command & Conquer franchise.

It is easy to play the classic open red alert game on Chromebook once you get the Linux beta.

method 1

  sudo apt update
  sudo apt install snapd
  sudo snapd install openra
  
method 2
wget https://github.com/OpenRA/OpenRA/releases/download/release-20200503/OpenRA-Red-Alert
-x86_64.AppImage
sudo chmod +x OpenRA-Red-Alert-x86_64.AppImage
./OpenRA-Red-Alert-x86_64.AppImage
enjoying your game!