fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

This is all you need to know:

~ $ top -bn1 |grep -A9999 "^ *PID " |awk '{foo+=$9} END {print foo}'
160.1
~ $ sensors |grep ^Package
Package id 0: +85.0°C (high = +100.0°C, crit = +100.0°C)
~ $ grep -m1 ^model.name /proc/cpuinfo
model name : 12th Gen Intel(R) Core(TM) i7-1260P

:eyeroll:

@RL_Dane
I have no idea what's going on. Yet, I know I could if I took the time to read the manpages and parse those flags.

I'm seriously conflicted right now.

@benjaminhollon

Teaching mode, engage!

top -bn1 |grep -A9999 "^ *PID " |awk '{foo+=$9} END {print foo}'
top: Run 1 instance of top and send it to STDOUT instead of a fancy tty-aware screen
grep: show me at least 9,999 lines after anything that matches this regexp, and the match itself
awk: use foo as a variable to accumulate the values in field 9 (cpu usage), and print it out once EOF is reached
output: 160.1

...

R. L. Dane :debian: :openbsd:

@benjaminhollon

...

sensors |grep ^Package
(Pretty self-explanatory)
output: Package id 0: +85.0°C (high = +100.0°C, crit = +100.0°C)

$ grep -m1 ^model.name /proc/cpuinfo
grep: give me exactly one match for the regexp
output: model name : 12th Gen Intel(R) Core(TM) i7-1260P

@RL_Dane
So if I'm putting it all together right you're saying that your computer is overworked right now?

@RL_Dane
Here's what I get from it all:

~] top -bn1 |grep -A9999 "^ *PID " |awk '{foo+=$9} END {print foo}'
24.9
~] nix-shell -p lm_sensors

[nix-shell:~]$ sensors |grep ^Package
Package id 0: +43.0°C (high = +100.0°C, crit = +100.0°C)

[nix-shell:~]$ grep -m1 ^model.name /proc/cpuinfo
model name : 12th Gen Intel(R) Core(TM) i5-1240P

@RL_Dane
I feel like if you're trying to communicate load, this works better?

~] uptime
21:04:14 up 3:44, 0 users, load average: 0.14, 0.18, 0.17

I mean, I guess you have to understand what the load averages mean.

@benjaminhollon

No, load is just kernel "pressure" in general -- how long the various "queues" (buffers?) within the kernel are. It can be from lots of i/o, lots of movement in memory, lots of processes being created, or possibly high CPU usage.

...

@benjaminhollon

...

But generally, load and CPU usage aren't strongly linked. I've seen insane loads with next to no CPU usage (too much i/o at once),and I've seen pegged CPU usage with moderate load (CPU 100% utilized, but not overstressed so much that things in the kernel start falling behind).

@RL_Dane
Hmm, interesting, I think for me in the past they've been relatively correlated.

@benjaminhollon

They can be, but it's measuring very different things. CPU utilization is just a part of system load. A high system load due to CPU 'pressure' (the term htop uses) alone would be like having 500% CPU utilization -- too much for the CPUs to take care of even at full tilt.

@RL_Dane
Ah, I miss the days when Windows Task Manager would give me a nice simple graph of my CPU usage from 1 to 100. I was so naive then.

@benjaminhollon

I remember when apm (the predecessor to ACPI) was disabled in the linux kernel whenever SMP (Symmetric MultiProcessing) was enabled... because if you had more than one CPU, why the heck would you be worried about energy usage? ;)

@RL_Dane
True, true. I guess I've never had to dig closely into performance since I use a miniscule fraction of my computer's resources.

All I know is it plays KSP at the highest graphics settings with no issues. ;)

@benjaminhollon

Argh, don't give me angst.

KSP is the ONLY game I want to play, and it's as unstable as Kierkegaard on Ketamine.

If you saw my post a couple days back, I literally place ONE part in the editor, save, place another, crash.

UGH.

@RL_Dane
Well, I can't play KSP on NixOS. I could probably custom-package it but don't want to go through that, so I have a Fedora dual boot I occasionally run to play for a couple hours.

Too bad it's crashing like that, though. On your new, 12th-gen computer?

I feel like you might enjoy Endless Sky. It's the one other thing I play and I *love* it. It's FOSS and should be available on Flathub if you want an easy way to get it.

@benjaminhollon

Interesting, sounds a bit like Elite.

Are the graphics and gameplay pretty nice?

@RL_Dane
Well, it's somewhere in between a shooting space game and a text adventure. You spend most of your time reading questline descriptions or hauling cargo between planets, trying to pay off the loans you took out to buy your ship (2.5% interest, compounding *daily*, iirc). But then you discover aliens and everything gets incredibly awesome.

I *love* it. The storytelling and worldbuilding is fantastic.

@benjaminhollon

Interesting, I'll have to check it out.

@RL_Dane
It's worth it. It seems a bit slow at first, but give it a chance. ;)

And definitely take the James questline that's offered to you right out of the gate; that's effectively the tutorial.

@benjaminhollon

BTW... joystick required/recommended?
I've got one, somewhere ;)

@RL_Dane
Hmm, I don't think so? It might be handy, I don't know, but you're going to need a keyboard too. Though it does let you remap things, so it might be possible to remap to a game controller? Not sure.

I've never used that kind of thing so I don't really know whether I *recommend* it. It's not what the devs and most players use, so if it does work support may be hit or miss.

@benjaminhollon

Oh, well if it's not what most people use, then I won't bother.
I don't even use a gamepad with KSP, although it helps when you need smooth motions. It's hard to do a smooth upward arc in an aircraft when you're hitting the down arrow like a 555 timer after fifteen espressos.

@RL_Dane
I use the keyboard for KSP too but I don't drink coffee so maybe that's your problem. ;)

I'll admit that it's gotten a bit trickier since switching to a 60% with no mouse, but a bit of remapping could help with that.

@benjaminhollon

I don't drink coffee, either. I just meant that it's hard to simulate smooth motions when all you can do is 0% or 100% in a particular direction. So you end up hitting the button over and over again, like a PWM, hence the 555 timer reference. 555 timers can be used to generate pwm (Pulse Width Modulation, i.e., simulating an analog output by turning the digital output off and on quickly, like a dimmer switch on a lamp)

@RL_Dane
Ahhh, I see what you mean. In KSP's case…

1. I usually use the SAS targets for orientation.
2. There's a little "cheat" that can help: entering time warp drains all angular momentum, meaning you can just get to the orientation you want, ignoring angular momentum, then immediately hit ., to freeze yourself there.

@benjaminhollon

Yes, I do love the time warp cheat.

What I do if I have limited battery and either don't have solar panels yet (or forgot to put them on) is do a little initial torque in the direction I want, physics warp 4X to speed it up, then '/' to cancel out the warp, wait for it to hit the direction I'm wanting it to face, then quickly '.' and ',' to time warp and cancel out all motion.

@RL_Dane
Do you have a way to warp just 4x? The lowest increment I can get in vacuum is 5x.

@benjaminhollon

It's manual physics warp. It helps when doing long burns. It's basically the same warp you have when in the atmosphere or lower than 3km or so on a planet/moon with no atmosphere.

I think it's <>/ instead of ,./

@RL_Dane
Ahh, I didn't know that one. That's handy. I was just waiting through entire burns. XD

@benjaminhollon

Yeah, when you're trying to get to Minmus with an Ant/Dawn/NERV, 4x physics burn helps keep your sanity. Especially if you've acquired maneuver target-lock SAS, which helps keep things smooth while warping.

KSP2 has a warp mode for maneuvers to enable interstellar travel.

Been playing KSP for over seven years, and I JUST NOW got a machine that could play recent versions of KSP1 ok. I guess I'll be getting into KSP2 some time around 2029. :P

@RL_Dane
I'd love to try KSP2, but I guess I'll have to wait for native linux support. And even then it might be a while before I convince my wallet to go for it.

@benjaminhollon

Man, cool as a cucumber. Maybe it's just my machine, and/or the fact that it's an i7.

I don't see you CPU usage, though.

Come to think of it, there's a MUCH simpler way to get total CPU:

top -bn1 |awk '$1~/^.Cpu/ {print 100-$8"%"}'

@RL_Dane
I don't know for i7—I've never used one. I'm honestly not sure what the difference is between all the generation names in the case of Intel, since they still keep manufacturing i3, i5, etc. for each generation.

~] top -bn1 |awk '$1~/^.Cpu/ {print 100-$8"%"}'
1.5%

;)

@benjaminhollon

My understanding from hearing an Intel rep talk in an engineering class I took 30 years ago (and from some other sources nearly as long ago) is that Intel manufacturers only a fairly few variety of chips, and given pretty high failure rates, they analyze what parts of the chip failed and disable parts of it (including, but not limited to the parts that failed) and sell it as a cheaper chip.

...

@benjaminhollon

...

I don't know how true that is anymore, but it's a pretty solid practice when you're constantly pushing the envelope on trace size. So an i5 *might* just be an i7 with part of the cache disabled -- from what I can see from the wikipedia pages, cache size and number of cores is the primary difference.

So the relatively rare dies produced with *nothing* wrong get sold as the top-of-the line CPUs, while the gimpy ones get sold as celerons, etc.

@RL_Dane
Ohh, interesting. I do seem to remember reading something about them ranking chips based on stability, so that might be part of it. I think overclocking was playing into that too, though.

@benjaminhollon

Ah, yes. Chips that are stable at higher clock rates get sold at those rates, and those less stable get sold at lower clock rates.

@benjaminhollon

No, I'm saying that with a very modest load (~150% cpu usage among SIXTEEN cores), it's a flerping BBQ.

@RL_Dane
Ahh, I see. Thermal issues, then? Where's the laptop located?

@benjaminhollon

In a pretty cool room, and with enough space between the bottom grille and the table.

But it's a very thin-and-light laptop, so thermals go very much NOT brrr. ;)

@RL_Dane
See, when at my desk I keep my laptop on a little stand, which helps somewhat. But generally I'm not doing any CPU-intensive tasks other than occasional OS upgrades.

@benjaminhollon

On that machine, most of the CPU goes to kernel tasks. Both encryption and btrfs have significant overhead, methink. Mainly btrfs.

Are you using ext4?

@RL_Dane
Huh, I thought I was using btrfs, but apparently I am using ext4. Now I'm tempted to reinstall NixOS. XD

In my experience the btrfs overhead isn't very significant.