Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts break due to locales #7

Open
martinvonwittich opened this issue May 15, 2021 · 0 comments
Open

Scripts break due to locales #7

martinvonwittich opened this issue May 15, 2021 · 0 comments

Comments

@martinvonwittich
Copy link

For example with de_DE.UTF-8, tlbstat is obviously reporting incorrect data like 0 cycles/instructions:

server ~/pmc-cloud-tools # locale
LANG=de_DE.UTF-8
LANGUAGE=
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=
server ~/pmc-cloud-tools # ./tlbstat 
K_CYCLES   K_INSTR      IPC DTLB_WALKS ITLB_WALKS K_DTLBCYC  K_ITLBCYC  DTLB% ITLB%
0          0           0.54 169        991        0          0          9092.34 621.05
0          0           0.60 156        739        0          0          13143.51 893.67
0          0           0.59 239        1          0          0          7564.99 648.94
^C

Setting LC_ALL=C fixes this:

server ~/pmc-cloud-tools # LC_ALL=C ./tlbstat
K_CYCLES   K_INSTR      IPC DTLB_WALKS ITLB_WALKS K_DTLBCYC  K_ITLBCYC  DTLB% ITLB%
2887484    1273377     0.44 7802665    493256     372235     16075      12.89  0.56
2951093    1423201     0.48 7694503    480076     360379     16713      12.21  0.57
3827055    2904295     0.76 8061665    689602     394809     22796      10.32  0.60
2925424    1297466     0.44 7594530    557178     361611     17717      12.36  0.61
^C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant