2022-12-01
Project description
pcvis
A command line tool for visualizing page cache of a given file
prerequisites
- install
pcstat
(Page Cache stat: get page cache stats for files, https://github.com/tobert/pcstat)- it has both Linux and macOS binaries since v0.0.1
installation
via pip
pip install pcvis
After installation, there will be a command called pcvis
you can use
manual
- Download this repo, copy the
pcvis/pcvis.py
from this repo - Move
pcvis.py
into your$PATH
(e.g./usr/local/bin
)
mv pcvis.py /usr/local/bin/pcvis
chmod +x /usr/local/bin/pcvis
usage
Visualize a given file's page cache status like below. In the visualized image, the white dots indicate the part of the file that is in the page cache.
pcstat -json -pps /path/to/my_file | pcvis
notes
- Before running the above command for visualization, you need to clean page cache so that the above result is accurate
# for linux
sync; echo 1 > /proc/sys/vm/drop_caches
# for macOS
sudo purge
- Some of the icons in the visualization requires UTF8 to render, so you may need to set locale to UTF8 under some systems
export LC_ALL="en_US.utf8"
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pcvis-0.2.0.tar.gz
(6.7 kB
view details)
Built Distribution
pcvis-0.2.0-py3-none-any.whl
(7.2 kB
view details)
File details
Details for the file pcvis-0.2.0.tar.gz
.
File metadata
- Download URL: pcvis-0.2.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eab39b6aaa2b326c67fdb931c2646e8ba4af4c1410c963abe3c12994ff85590f |
|
MD5 | ffc42c0d0ca0d37741ebfd1e9879e21e |
|
BLAKE2b-256 | 6e439a7c6c77030742b8fe7c3d6d1b5079d9e6349341f0d564e9bf13e0083fc5 |
File details
Details for the file pcvis-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: pcvis-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e175c2cbd549a760f64483901e873a2e1d8cf19dcdf3ce71e9c631210fd8324 |
|
MD5 | 66e0fa45b8a23705d513dee1e49ad03e |
|
BLAKE2b-256 | f018d7609acbf2687dd3496192ae156d1799d0aeead5aed2afc3afe4485d0572 |