Microsoft recently announced that they brought Ubuntu userspace to Windows, and that this features will be officially released in Windows 10’s Anniversary Update and called Windows Subsystem for Linux. But people part of the company’s insider program can already try the beta version of “Bash on Windows”, and Phoronix ran some benchmarks in bash in Windows 10, and repeated the tests in Ubuntu 16.04, Ubuntu 14.04, and Clear Linux. The test machine was based on an Intel Xeon E3-1280 v5 Skylake CPUwith 16GB of RAM and 120GB Samsung 850 EVO SSD. Many of the results show Windows Subsystem for Linux (I’ll just call it Windows 10 in the rest of the post) just performing a little slower than on the Linux distributions, but there are also some outliers, which I’m going to cover here. The most surprising results is when Windows 10 clearly outperforms Linux at its own game which […]
Microsoft Brings Bash on Ubuntu on Windows 10
Yes, you’ve read that right, and no, it’s not an April Fools’ Day prank, Microsoft and Canonical really cooperated to bring Ubuntu user space to Windows 10 allowing developers and others to run bash commands directly into Windows. All you’ll need to do is to install Ubuntu on Windows app, hit the Windows key, and type bash to get a terminal window. Once you are in bash, you can run any Ubuntu command line, including apt-get to install packages, just like if you were in a terminal in Ubuntu, and all binaries are the same as in Ubuntu, as Microsoft implemented new infrastructure within Windows called the Windows Subsystem for Linux (WSL). That means Ubuntu runs without Linux, but instead the implementation is a conversion layer somewhat similar to Wine to run Windows programs in Ubuntu, or Libhybris to convert Linux calls to Android calls. Dustin Kirkland, in charge of […]
ps_mem Shows Programs RAM Usage in Linux
There are several ways to see how much RAM is used in a Linux system with tools like free, vmstat, top, etc…, but today I’ve come across ps_mem which displays the RAM used for each program in a neat way. The post on lintut.com explains how to install it on Centos / Fedora:
1 |
yum install ps_mem -y |
As a Ubuntu user, I immediately tried apt-get install ps_mem, but there isn’t such package. After running apt-file search, I found it in w3af-console package:
1 2 3 |
sudo apt-get install w3af-console sudo chmod +x /usr/share/w3af/core/controllers/profiling/ps_mem.py sudo ln -s /usr/share/w3af/core/controllers/profiling/ps_mem.py /usr/sbin/ps_mem |
Another way to install the script is to simply get it from Github. Running the command without options will list of programs with RAM usage from the smallest to the largest:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
sudo ps_mem Private + Shared = RAM used Program 4.0 KiB + 33.0 KiB = 37.0 KiB inetutils-inetd 4.0 KiB + 35.0 KiB = 39.0 KiB rpc.idmapd 4.0 KiB + 39.5 KiB = 43.5 KiB rpc.mountd 4.0 KiB + 48.5 KiB = 52.5 KiB rpc.statd 8.0 KiB + 62.0 KiB = 70.0 KiB atieventsd 44.0 KiB + 46.5 KiB = 90.5 KiB rtkit-daemon 96.0 KiB + 18.5 KiB = 114.5 KiB cat ............ 150.5 MiB + 5.1 MiB = 155.6 MiB gimp-2.8 186.5 MiB + 9.5 MiB = 196.0 MiB plugin-container 270.8 MiB + 12.1 MiB = 282.9 MiB compiz 348.5 MiB + 19.0 MiB = 367.5 MiB nautilus 409.3 MiB + 3.4 MiB = 412.7 MiB thunderbird 393.8 MiB + 28.0 MiB = 421.8 MiB Xorg 2.1 GiB + 11.0 MiB = 2.1 GiB firefox --------------------------------- 5.0 GiB ================================= |
You can also check the full command line for the programs: sudo ps_mem -s Private + Shared = RAM used Program 4.0 KiB + 31.5 KiB = 35.5 KiB /sbin/getty -8 38400 tty5 4.0 KiB + 32.0 KiB […]