Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Please specify dependencies packages name or git repo #2

Open
ABelliqueux opened this issue May 5, 2020 · 5 comments
Open

Please specify dependencies packages name or git repo #2

ABelliqueux opened this issue May 5, 2020 · 5 comments

Comments

@ABelliqueux
Copy link

Hi,

Trying to use ioprof. I've been able to obtain a tar file from a trace, but can't create the report.

./ioprof.pl (2.0.5) Unpacking sda.tar. This may take a minute. Use of uninitialized value $total_lbas in scalar chomp at ./ioprof.pl line 1985. Argument "" isn't numeric in multiplication (*) at ./ioprof.pl line 1988. Use of uninitialized value $total_lbas in multiplication (*) at ./ioprof.pl line 1988. Use of uninitialized value $total_lbas in printf at ./ioprof.pl line 1990. lbas: 0 sec_size: 0 total: 0.00 GiB Use of uninitialized value $total_lbas in multiplication (*) at ./ioprof.pl line 1992. Time to parse. Please wait... Finished parsing files. Now to analyze Done correlating files to buckets. Now time to count bucket hits.

I suspect I miss some of the 'Optional dependencies' ?

I couldn't find what you refer to specifically in the optional PDF deps :

Optional PDF report requires:

gnuplot
pdf2latex
terminal png

What are 'pdf2latex' and 'terminal png' ? Packages names ? Can you point to git repos for those ?

Thanks !

@bjdonie
Copy link
Contributor

bjdonie commented May 5, 2020 via email

@ABelliqueux
Copy link
Author

ABelliqueux commented Jun 11, 2020

Hi, Sorry for the late reply.

Is this utility supposed to work only on Intel SSDs ?

Output for fdisk -ul /dev/sda :

Disque /dev/sda : 232,91 GiB, 250059350016 octets, 488397168 secteurs
Modèle de disque : Samsung SSD 850
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x89c8fd82

Périphérique Amorçage Début Fin Secteurs Taille Id Type
/dev/sda1 2048 31602687 31600640 15,1G 5 Étendue
/dev/sda3 31602688 49180671 17577984 8,4G 82 partition d'échange Linux / Solaris
/dev/sda4 49180672 488396799 439216128 209,4G 83 Linux
/dev/sda5 4096 413695 409600 200M 83 Linux
/dev/sda6 415744 825343 409600 200M b W95 FAT32
/dev/sda7 827392 31602687 30775296 14,7G 83 Linux

Here is what I do :

sudo ./ioprof.pl -m trace -d /dev/sda -r 10

I obtain a 10.2ko sda.tar file.

After that :

sudo ./ioprof.pl -m post -t sda.tar

./ioprof.pl (2.0.5)
Unpacking sda.tar. This may take a minute.
Use of uninitialized value $total_lbas in scalar chomp at ./ioprof.pl line 1985.
Argument "" isn't numeric in multiplication () at ./ioprof.pl line 1988.
Use of uninitialized value $total_lbas in multiplication (
) at ./ioprof.pl line 1988.
Use of uninitialized value $total_lbas in printf at ./ioprof.pl line 1990.
lbas: 0 sec_size: 0 total: 0.00 GiB
Use of uninitialized value $total_lbas in multiplication (*) at ./ioprof.pl line 1992.
Time to parse. Please wait...
Finished parsing files. Now to analyze
Done correlating files to buckets. Now time to count bucket hits.

I'm on manjaro/archlinux and found pdflatex in the package pdflatex-core . As for 'terminal png', still no idea what package it refers to...

Thanks for your answer !

@bjdonie
Copy link
Contributor

bjdonie commented Jun 11, 2020

I have not attempted to run this utility with languages other than English. Unfortunately, I believe the French output from fdisk is causing the parser to fail. I didn't have plans to internationalize the tool, but let me know if French is the only language requested.

This utility should work on all block devices, regardless of manufacturer, virtual block devices like software raid, and logical volume (LVM) devices.

@ABelliqueux
Copy link
Author

Hi, I can obtain the fdisk results in english by setting 'LANG' before the command:

LANG=en_US.UTF-8 sudo ./ioprof.pl -m post -t sda.tar

Different result !

./ioprof.pl (2.0.5)
Unpacking sda.tar. This may take a minute.
Argument "bytes" isn't numeric in multiplication (*) at ./ioprof.pl line 1988.
lbas: 488397168 sec_size: 0 total: 0.00 GiB
Time to parse. Please wait...
Finished parsing files. Now to analyze
Done correlating files to buckets. Now time to count bucket hits.

Illegal modulus zero at ./ioprof.pl line 883`

The culprit is at line 1979 :

$sector_size=cat $fdisk_file | grep 'Units'| awk '{ print \$9 }';
returns "bytes" instead of a number (512 here )

cat $fdisk_file | grep 'Units' alone returns :

Units: sectors of 1 * 512 = 512 bytes

Changing $9 to $8 at line 1979 solves the issue.

I'm attaching the resulting tar file if you want to investigate.
sda.zip

As for the pdf output, it needs the 'mktexfmt' that's present in the 'texlive-core' package in archlinux. That's a 396.52 MB install. Is there a way to use another tool to generate the pdf ?

LANG=en_US.UTF-8 ./ioprof.pl -m post -t sda.tar -p

kpathsea: Running mktexfmt pdflatex.fmt
mktexfmt: No such file or directory
ERROR: Failed to run report Error: at ./ioprof.pl line 1226.

@bjdonie
Copy link
Contributor

bjdonie commented Jun 17, 2020

Have you tried pulling the latest changeset from the repo? I had another user report an issue with Ubuntu that I fixed this exact issue last week, but I truly appreciate the quick look into the code! Each version of fdisk seems to have slightly different output, so it makes it tricky to keep up.

If you don't truly need a PDF, but just want to see the data, you can exclude the -p option. It will print the heatmap to the console. It is mostly the same data as the PDF, frankly, although the "bucket" size may vary depending on the console size. If you do use the console, try making it really big.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants