[HN Gopher] Linux commands for advanced hardware and system info
___________________________________________________________________
Linux commands for advanced hardware and system info
Author : nxss
Score : 121 points
Date : 2022-06-27 14:23 UTC (8 hours ago)
(HTM) web link (nixsanctuary.com)
(TXT) w3m dump (nixsanctuary.com)
| shmerl wrote:
| For lsusb and lspci you might need sudo for more detailed output.
| ssd8991 wrote:
| rkwasny wrote:
| Hi, small fix:
|
| $ hdparm -tT /dev/sdN - partition reading & writing benchmark
|
| It will just benchmark reading, not writing, perfectly safe to
| run it on a disk with data.
| rahen wrote:
| They should have mentioned udevadm too. How do they debug their
| udev rules without it?
|
| Overall a low quality article IMHO, it's just basic knowledge in
| a fancy dress.
| mmh0000 wrote:
| hdparm is an "okay" tool for a quick read speed benchmark, but if
| you really want to benchmark Linux storage, its hard to beat
| fio[0]
|
| [0] https://github.com/axboe/fio
| jchristian- wrote:
| > For Advanced Hardware and System Info
|
| This first command is literally `uname`, one of the most basic
| and known commands...
| grandchild wrote:
| `lstopo` is cool too for bigger servers
| nikisweeting wrote:
| There's a similar much longer list compiled here too:
| https://docs.monadical.com/s/system-monitoring-tools
| theden wrote:
| This one is much better!
| marcodiego wrote:
| Something I miss about IRIX: hwgfs. Nowadays, /sys mostly makes
| up for that, I like the fact that I mess with my leds from a
| simple filesystem, but it is nowhere near as tidy was IRIX' hwgfs
| was.
| emersion wrote:
| For display chips in GPUs, there is drm_info. For GL/Vulkan,
| eglinfo/glinfo/vulkaninfo.
| jandrese wrote:
| glxinfo is also handy, especially if you aren't sure which
| driver the system is using.
| snarfy wrote:
| The article picture almost had a Droste effect, almost.
|
| https://en.wikipedia.org/wiki/Droste_effect
| deathanatos wrote:
| ... and is really _weird_ ; who has have a picture of
| themselves, taken from behind, as a desktop background?
|
| I realize it's pointless splash art. Also do which articles
| wouldn't bother with pointless splash that has nothing to do
| with the article. Half the screens feature ... macOS.
| traceroute66 wrote:
| I have to say the title is a bit clickbaity.
|
| Since when were
| uname,dmesg,fdisk,gdisk,parted,blkid,lsblk,mount,df and /proc
| "advanced" commands ?
|
| A newbie will likely need to use all of them within the first
| week of them ever using Linux.
| mhh__ wrote:
| If you install Ubuntu or any other user friendly distro you
| might not _ever_ use any of them.
|
| I know what they are, obviously, but I don't think I've needed
| any of them other than uname because I don't know where Ubuntu
| prints the kernel version.
| antisthenes wrote:
| > If you install Ubuntu or any other user friendly distro you
| might not ever use any of them.
|
| Maybe if you install Ubuntu and then never use any program
| other than your browser to check email and whatever the
| built-in office suite is, and also never change any settings.
|
| But then again that type of user will never Google for
| "advanced Linux commands" in the first place. They're just
| going to ask the person who installed Ubuntu for them.
| worik wrote:
| I've been using Linux since 1995.
|
| I had never heard of `inxi`. 21k lines of Perl, not Bash....
| hutzlibu wrote:
| "A newbie will likely need to use all of them within the first
| week of them ever using Linux."
|
| And then some people wonder, why the year of the linux desktop
| still has not arrived. But luckily no, unless things went very
| wrong, a newbie will not have to invoke those commands - and if
| he indeed has to, he or she will likely just give up anyway.
|
| (Btw. I use linux since years and so far only had to use half
| of the listed commands.)
| krylon wrote:
| I concur. I've been using GNU/Linux on the desktop (and
| server) for 20 years, I don't think I ever used blkid or
| lsblk.
|
| fdisk, on the other hand, was a thing in the DOS/Windows
| world, too, back in the day, and dealing with partitioning is
| something you are going to do regardless of the OS you are
| using.
| hnlmorg wrote:
| The DOS fdisk was a very different beast to its Linux/UNIX
| counterpart.
| mbiondi wrote:
| lsblk is super helpful and I've used it many, many times
| since I found it about 5 years ago.
|
| inxi is a new one for me.
|
| Command usage / knowledge depends on what you need and why.
| krylon wrote:
| > inxi is a new one for me.
|
| For me, too. I was surprised to find it already installed
| on my system. :)
| yjftsjthsd-h wrote:
| > I concur. I've been using GNU/Linux on the desktop (and
| server) for 20 years, I don't think I ever used blkid or
| lsblk.
|
| How do you write disk images (like, if you're installing a
| new machine and you need to write the installer to a USB
| drive)? I always use lsblk to find the right device name,
| then dd to write it.
| krylon wrote:
| I use dd, too. But I usually know what device corresponds
| to the USB drive. If my laptop only has one HDD/SSD, it's
| /dev/sda, so a USB drive will show up as /dev/sdb. My
| desktop has two internal SSDs, sda and sdb, so the USB
| drive is going to be sdc.
| rootlocus wrote:
| I have interviewed "senior devops" candidates that didn't know
| what procfs was.
|
| edit: We didn't consider them for the role.
| geekbird wrote:
| Actually, a lot of the people new to DevOps who come from the
| Dev side don't know the Linux internals. All they know is
| TF/CF, k8s, Docker and either AWS or GCP. If you asked them
| to set up a raid array they'd look at you like you just grew
| a second head. If you asked them how to tell what modules the
| kernel was running, they wouldn't be able to find out without
| a lot of googling.
|
| The fact that DevOps does encompass a lot of fundamental
| Linux system knowledge is glossed over by a lot of people.
| Then again, some of them don't know any other way to package
| and deploy software except in containers.
| metadat wrote:
| Hopefully they didn't get the green light..
| pengaru wrote:
| > I have interviewed "senior devops" candidates that didn't
| know what procfs was.
|
| We've all had our fair share of encountering dishonest
| interviewees/resumes.
| dijit wrote:
| Either we have abstracted away the operating system so this
| is a non-issue or those candidates are simply not qualified.
|
| If you're senior then I would definitely expect you to know
| those commands, if you're senior you've been around long
| enough that they were relevant. Even if they're not now.
| jotm wrote:
| I know what it is, do I qualify for at least a junior
| position? :D
| cal85 wrote:
| You're already advanced then.
|
| Your claim about "within the first week" is a bit silly. I've
| used Linux on and off for the last 15-20 years. Just
| occasionally, to get certain things done in my development
| work. And I couldn't tell you what any of those commands do
| (although I've probably used them a few times by copying and
| pasting). Advanced is subjective.
| jethro_tell wrote:
| It may be true that people don't need to use these commands
| in the first week. Still doesn't make them advanced. Perhaps
| intermediate but I think even that is a stretch.
|
| You can drive a car and never open the hood if you want.
| Opening the hood to change the oil still doesn't make you
| advanced in any way shape or form. Doing your own breaks is a
| step further but it's still pretty basic.
|
| Swapping your engine, is advanced, redoing your suspension is
| advanced. You can't just call using an oil pan and a wrench
| advanced because most people don't it.
| cal85 wrote:
| I'd settle for intermediate.
| A4ET8a8uTh0 wrote:
| I think I disagree. I stumbled on lspci specifically, because
| I built my new PC with dual gpu ( to use real gpu in VMs ). I
| do not consider myself an advanced user ( maybe intermediate
| ).
|
| I basically agree with OP. Advanced does mean advanced. It
| does not mean using couple of simple commands picked from one
| google search. To me it means being able to think a little
| beyond the basics and putting things together.
|
| Advanced is subjective, but we should not water it down to
| basically a list of basic commands...
| bayindirh wrote:
| I'm also using Linux for ~20 years, and used these commands
| periodically on my personal systems and at work daily.
|
| None of these commands are advanced. Yes, they might not be
| "very beginner level", but listing your partitions,
| PCI/USB/SCSI/FireWire devices, and learning other stuff about
| your system is not advanced level stuff.
|
| Most of these commands equals to right clicking something and
| opening "Properties" panel, nothing more. Parted is a
| partition editor though. You might wipe your system
| accidentally if you don't know what you're doing.
|
| The advanced stuff starts with interrupt tables, CPU
| frequency hysteresis settings, writing custom governors for
| cqufreqd or starting to isolate your services under cgroups
| for resource management.
|
| Edit: Just used lsblk & mount to see where a disk is and what
| filesystem it has, literally 3 minutes after writing this
| comment.
| blown_gasket wrote:
| It depends on what the person was trying to accomplish in
| their first week of using Linux. Did they see a certification
| book for LPIC or Linux+ and get interested to go through it?
| They will for sure hit these commands in the first week of
| using Linux than.
|
| Using Linux for objectives that are not Linux administration
| you will probably not hit these commands. You probably won't
| be dealing with the partitioning of your hard disk if you use
| a graphical installer and let it partition things
| automatically. That knocks - fdisk, gparted, parted, lsblk,
| and blkid off the list.
|
| I wouldn't even expect someone that uses Linux as an
| alternative to Windows to use ps, netstat, or top. I would
| expect them to encounter the package management commands
| though: apt, pacman, yum, dnf.
| xpuente wrote:
| numactl is missing there. Information about memory topology is
| quite important.
| zekrioca wrote:
| It is not available in some distributions and one needs to
| install it (e.g., on Ubuntu/Debian: # apt install numact).
| gorgoiler wrote:
| Roll up! Roll up! Decode your Intel model/"stepping"
| (model/version) into a precise SKU name here:
| https://github.com/torvalds/linux/blob/master/arch/x86/inclu...
|
| No, I do not know why every single ICELAKE processor is commented
| as _Sunny Cove_.
| zokier wrote:
| > No, I do not know why every single ICELAKE processor is
| commented as Sunny Cove.
|
| Wikipedia can clarify that for you:
|
| > Ice Lake is Intel's codename for the 10th generation Intel
| Core mobile and 3rd generation Xeon Scalable server processors
| based on the Sunny Cove microarchitecture
|
| https://en.wikipedia.org/wiki/Ice_Lake_(microprocessor)
| gorgoiler wrote:
| Thanks. I figured Sunny Cove was a post-Ice-Lake iteration,
| but for some reason wasn't being listed by itself in the .h.
| h2odragon wrote:
| > lsscsi - print attacked SCSI devices into
|
| appropriate typo
___________________________________________________________________
(page generated 2022-06-27 23:02 UTC)