Here, we outline how to parse old data in Sys-snap, which is used to track down the causes of resource shortages, whether CPU or memory-related, even when no one is looking.
Related Articles
Install Sys-snap
Using Sys-snap
Parse Old Data
IMPORTANT: This solution will require root access. If this needs to be obtained, follow the guide on requesting root access.
TIP: Take a look at GitHub's article about Sys-snap for more information.
- SSH into the server as root
- Ensure that Sys-snap is installed by running
sys-snap.pl --check
TIP: If Sys-snap is not installed, install it. - Create a new directory to extract the archived file
IMPORTANT: Extracting the archived file directly will overwrite the current system-snapshot directory. To avoid this, a new directory should be created.
- Run the command
mkdir <new directory>
REPLACE: <new directory> with the archived file name without the tar.gz extension. - Extract the archived system-snapshot file into the newly created directory by running the command
tar -xf <archived file> -C <new directory>
- REPLACE: <archived file> with the name of the tar.gz file and <new directory> with the name of the newly created directory
- Run the command
- Use the --dir flag by running
sys-snap.pl --print <start-time end-time> --dir=PATH/TO/UNARCHIVEDDIR
to parse the old data
REPLACE: PATH/TO/UNARCHIVEDDIR with the path of the unarchived system-snapshot directory.
EXAMPLE:~# mkdir system-snapshot.20240304.1342 && tar -xf \
> system-snapshot.20240304.1342.tar.gz -C system-snapshot.20240304.1342
~# sys-snap.pl --print 10:00 11:00 \
> --dir=system-snapshot.20240304.1342/root/system-snapshot | head -9
user: root
cpu-score: 2.60
memory-score: 629.20
user: login
cpu-score: 2.30
memory-score: 0.40
user: dovecot
cpu-score: 1.00
memory-score: 4.30
Comments
0 comments
Article is closed for comments.