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

Wrong PhysicalPercentUsed percentage #2332

Closed
1 task done
jayagami opened this issue May 26, 2022 · 7 comments
Closed
1 task done

Wrong PhysicalPercentUsed percentage #2332

jayagami opened this issue May 26, 2022 · 7 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@jayagami
Copy link

Code of Conduct

  • I agree to follow this project's Code of Conduct

What happened?

A bug happened!
image

show wrong PhysicalPercentUsed percentage,

seems related to #1786 (comment)

could be a upstream problem.

Theme

clean-detailed, 1_shell

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

Run duration: 111.1341ms

Cache path: C:\Users\uchiha\AppData\Local\oh-my-posh

Config path: C:\Users\uchiha\scoop\apps\oh-my-posh\current\themes\clean-detailed.omp.json

Logs:

2022/05/26 12:06:38 debug: Getenv
C:\Users\uchiha\AppData\Local
2022/05/26 12:06:38 Getenv duration: 0s, args: LOCALAPPDATA
2022/05/26 12:06:38 CachePath duration: 2.4943ms, args:
2022/05/26 12:06:38 debug: Getenv
C:\Users\uchiha\scoop\apps\oh-my-posh\current\themes\clean-detailed.omp.json
2022/05/26 12:06:38 Getenv duration: 0s, args: POSH_THEME
2022/05/26 12:06:38 Shell duration: 17.1424ms, args:
2022/05/26 12:06:38 resolveConfigPath duration: 17.1424ms, args:
2022/05/26 12:06:38 Init duration: 19.6367ms, args:
2022/05/26 12:06:38 Flags duration: 0s, args:
2022/05/26 12:06:38 config.loadConfig duration: 539.1µs, args:
2022/05/26 12:06:38 Flags duration: 0s, args:
2022/05/26 12:06:38 debug: Getenv

2022/05/26 12:06:38 Getenv duration: 0s, args: OMP_CACHE_DISABLED
2022/05/26 12:06:38 Root duration: 0s, args:
2022/05/26 12:06:38 Shell duration: 0s, args:
2022/05/26 12:06:38 ErrorCode duration: 0s, args:
2022/05/26 12:06:38 IsWsl duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 debug: Home
C:\Users\uchiha
2022/05/26 12:06:38 PathSeparator duration: 0s, args:
2022/05/26 12:06:38 PathSeparator duration: 0s, args:
2022/05/26 12:06:38 debug: User
uchiha
2022/05/26 12:06:38 User duration: 0s, args:
2022/05/26 12:06:38 debug: Host
SEELE
2022/05/26 12:06:38 Host duration: 0s, args:
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 Flags duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 debug: Home
C:\Users\uchiha
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 Shell duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 debug: Home
C:\Users\uchiha
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 Shell duration: 0s, args:
2022/05/26 12:06:38 Flags duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 Shell duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 debug: Home
C:\Users\uchiha
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 Shell duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 debug: Home
C:\Users\uchiha
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 Shell duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 debug: Home
C:\Users\uchiha
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 ExecutionTime duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 Shell duration: 0s, args:
2022/05/26 12:06:38 Flags duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 debug: Home
C:\Users\uchiha
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 HasCommand duration: 17.5125ms, args: git.exe
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 error: HasParentFilePath
CreateFile C:\.git: The system cannot find the file specified.
2022/05/26 12:06:38 HasParentFilePath duration: 0s, args: .git
2022/05/26 12:06:38 Flags duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 debug: Home
C:\Users\uchiha
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 Shell duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 debug: Home
C:\Users\uchiha
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 Shell duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 debug: Home
C:\Users\uchiha
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 Root duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 debug: Home
C:\Users\uchiha
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 Flags duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 debug: Home
C:\Users\uchiha
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 Flags duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 debug: Home
C:\Users\uchiha
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 PathSeparator duration: 0s, args:
2022/05/26 12:06:38 PathSeparator duration: 0s, args:
2022/05/26 12:06:38 PathSeparator duration: 0s, args:
2022/05/26 12:06:38 PathSeparator duration: 0s, args:
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 IsWsl duration: 0s, args:
2022/05/26 12:06:38 StackCount duration: 0s, args:
2022/05/26 12:06:38 error: DirIsWritable
Write permission bit is not set on this file for user
2022/05/26 12:06:38 DirIsWritable duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 Shell duration: 0s, args:
2022/05/26 12:06:38 Flags duration: 0s, args:
2022/05/26 12:06:38 debug: Pwd
C:\Users\uchiha
2022/05/26 12:06:38 Pwd duration: 0s, args:
2022/05/26 12:06:38 debug: Home
C:\Users\uchiha
2022/05/26 12:06:38 GOOS duration: 0s, args:
2022/05/26 12:06:38 ErrorCode duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 TemplateCache duration: 0s, args:
2022/05/26 12:06:38 Shell duration: 0s, args:
2022/05/26 12:06:38 debug: Getenv
C:\Users\uchiha\AppData\Local
2022/05/26 12:06:38 Getenv duration: 0s, args: LOCALAPPDATA
2022/05/26 12:06:38 CachePath duration: 0s, args:
2022/05/26 12:06:38 Flags duration: 0s, args:
@jayagami jayagami added the 🐛 bug Something isn't working label May 26, 2022
@JanDeDobbeleer
Copy link
Owner

@jayagami this is actually correct as you're using .PhysicalPercentUsed which is the percentage of physical memory in use and not an indication of CPU load. CPU load is currently not yet exposed.

@gregkonush
Copy link

gregkonush commented Nov 14, 2022

There are variables available Load1, Load5, and Load15. You can use that to swap in theme JSON file like so:

"template": "\uf85a CPU: {{ round .Load1 .Precision }}% | ",

image

@gork3n
Copy link
Contributor

gork3n commented Feb 4, 2023

Themes that are packaged with the oh-my-posh install use the memory percentage as the CPU stat. Anyway in clean-detailed.omp.json I changed CPU: to MEM: moved "trailing_diamond": "<transparent,#516BEB\ue0b2</>", from MEM: block to the CPU: block and deleted the whole MEM: block.

@JanDeDobbeleer
Copy link
Owner

@gork3n mind doing a PR for this?

@Jhonmcr
Copy link

Jhonmcr commented Oct 30, 2023

Hola amigos una pregunta, que plugin usan para que la terminal se vea con ese estilo?

@JanDeDobbeleer
Copy link
Owner

Hello friends, a question, what plugin do you use to make the terminal look like that?

@Jhonmcr you find yourself in the oh-my-posh repository, so there's your answer 😅

Copy link

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues.
If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants