Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Martytoof posted:

Is there a good way to pare down the "amazing poo poo" opensuse installs? I am building a computer for my mom at my dad's request after her Mac started failing, but I have this sinking feeling that if I let her loose on opensuse the way it is I'm literally going to be on the phone with her every five minutes trying to explain something.

Like 'winlite', but for Linux?

Adbot
ADBOT LOVES YOU

enotnert
Jun 10, 2005

Only women bleed

Martytoof posted:

Is there a good way to pare down the "amazing poo poo" opensuse installs? I am building a computer for my mom at my dad's request after her Mac started failing, but I have this sinking feeling that if I let her loose on opensuse the way it is I'm literally going to be on the phone with her every five minutes trying to explain something.

Stipulation is that it'll be opensuse because that's what my dad "knows" and he won't hear anything against it. If I tell him to just build it since he knows about opensuse, he'll build it his way and they're basically going to murder each other because my mom is a technophobe and needs a five minute talk through of how to move a mouse to launch firefox, and my dad will just tell her to browse for Firefox among the other 200 apps installed on the system and will get upset when she can't find it, etc etc.

Things like the plasma desktop, the dozens of icons in the tray, the multiple desktops -- all have to go. Ideally I would like to make the experience as simple as possible, and remove any chance of her clicking something and being taken to some desktop, or opening some widget window -- hopefully you guys know where I'm going with this.

Like ideally I would love to recreate as much of the mac "experience" as I can, a dock-ish thing with four launchers for an email client, a web browser, and a photo manager.

I have literally not used Linux on a desktop since like 2003 or so, so when I installed openSuse I was pretty blown away by all the whiz-bang that they've added.

I hope this doesn't come across as combattive or anything. I really enjoy Linux on the server side of things, and I'm not looking to start any debate on the usability of Linux as a desktop, just some advice to help me pare down the features in Suse for my technophobe mom :)

If you can install docky in suse, it acts a load like the osx dock. Then just remove the other poo poo you don't need.

It's what I set my parents up for on linux. Took them about a day to get used to it as they were used to windows.

some kinda jackal
Feb 25, 2003

 
 
Can I just pull plasma and all that poo poo in Yast, or will that fundamentally break something? Cause if I can do that then I think you just pretty much answered my question, thanks!

calandryll
Apr 25, 2003

Ask me where I do my best drinking!



Pillbug

Martytoof posted:

Can I just pull plasma and all that poo poo in Yast, or will that fundamentally break something? Cause if I can do that then I think you just pretty much answered my question, thanks!

You could try rolling your own distro of OpenSUSE. You can add and remove stuff pretty easily, supposedly. I tried building a VMWare image one time so I don't know much about it. But look here. http://susestudio.com/

some kinda jackal
Feb 25, 2003

 
 
Cool, thanks very much. I'll try pulling that stuff in Yast first, then if that fails I'll try rolling my own.

Also, general question to everyone: Is it normal for the Suse updater to be completely broken after a fresh install? Like the last two times I installed a Suse system the updater wasn't able to do its thing because it thought something else was using the package system, and when you opened up Yast it would just complain more -- I don't know if I'm doing something wrong or whether it's just a mess.

I'm betting I'm just doing it wrong though.




Bob Morales posted:

Like 'winlite', but for Linux?

Not sure what winlite is, but if it's something that makes the UI nearly idiot-proof then yeah :)

some kinda jackal fucked around with this message at 10:47 on Feb 14, 2011

oRenj9
Aug 3, 2004

Who loves oRenj soda?!?
College Slice
Is it possible to halt an SSH instance on the host machine from inside the instance?

The reason I ask is because, when I work from home, I have to ssh into my machine in the office, then, ssh from there into servers. It would be nice to be able to put the ssh process into the background so that I can bounce back and forth between my work machine and the servers without having to kill the ssh session and bring it back up.

Scaevolus
Apr 16, 2007

Why not just use screen?

text editor
Jan 8, 2007

oRenj9 posted:

Is it possible to halt an SSH instance on the host machine from inside the instance?

The reason I ask is because, when I work from home, I have to ssh into my machine in the office, then, ssh from there into servers. It would be nice to be able to put the ssh process into the background so that I can bounce back and forth between my work machine and the servers without having to kill the ssh session and bring it back up.

if I'm understanding this right, I think you want to install/use screen on your work machine. It's kinda like a window manager for the shell (bad description, but still).

oRenj9
Aug 3, 2004

Who loves oRenj soda?!?
College Slice

ClosedBSD posted:

if I'm understanding this right, I think you want to install/use screen on your work machine. It's kinda like a window manager for the shell (bad description, but still).

Yeah, I usually use screen for this task, but sometimes I forget to launch a screen session first.

Edit: I figured this out. If you go to a new line, hit shift-` then ctrl-z, it will work.

oRenj9 fucked around with this message at 22:31 on Feb 15, 2011

text editor
Jan 8, 2007

oRenj9 posted:

Yeah, I usually use screen for this task, but sometimes I forget to launch a screen session first.

Here is a guide on multiple 'windows' in screen, i used to know of a better one but can't find it
http://mdxi.collapsar.net/docs/screen/#s200

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Martytoof posted:

Not sure what winlite is, but if it's something that makes the UI nearly idiot-proof then yeah :)


strips all the crap out of Windows installs so that it fits in 400mb or whatever depending on the version of Windows, of course.

Dilbert As FUCK
Sep 8, 2007

by Cowcaster
Pillbug
I hope this thread can help me out, it is pretty basic

I am implementing an apache, sendmail, and FTP services I am trying to decide between Centos and fedora.

Fedora seems to have more customizations and such but less stable
Centos seems to be more stable but less customizable

I know both are for the most part the same but any suggestions?

I am most likely going with Centos

pram
Jun 10, 2001
What do you mean more customizable?? Centos comes with apache, sendmail (use postfix though) and vsftpd running right out of the box. The only difference between Centos and Fedora you'll encounter is that the stock repositories for Centos have older versions than Fedora will have.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Corvettefisher posted:

I hope this thread can help me out, it is pretty basic

I am implementing an apache, sendmail, and FTP services I am trying to decide between Centos and fedora.

Fedora seems to have more customizations and such but less stable
Centos seems to be more stable but less customizable

I know both are for the most part the same but any suggestions?

I am most likely going with Centos
New Fedora versions are end-of-life and stop receiving security updates around 12-15 months after release, compared with ten years for RHEL/CentOS.

Pram posted:

What do you mean more customizable?? Centos comes with apache, sendmail (use postfix though) and vsftpd running right out of the box. The only difference between Centos and Fedora you'll encounter is that the stock repositories for Centos have older versions than Fedora will have.
Fedora has probably ten times the amount of available packages in its default repositories compared to CentOS. The stock packages in CentOS are awful for hosting something like an FTP server with virtual users (as opposed to system accounts).

pram
Jun 10, 2001

Misogynist posted:

New Fedora versions are end-of-life and stop receiving security updates around 12-15 months after release, compared with ten years for RHEL/CentOS.

Fedora has probably ten times the amount of available packages in its default repositories compared to CentOS. The stock packages in CentOS are awful for hosting something like an FTP server with virtual users (as opposed to system accounts).
The stock packages are out of date and limited yes but there are Centos repositories with stuff like pure-ftpd:

http://packages.sw.be/pure-ftpd/

Also most importantly anything that works on RHEL will work on Centos, and maybe not Fedora.

Dilbert As FUCK
Sep 8, 2007

by Cowcaster
Pillbug

Pram posted:

The stock packages are out of date and limited yes but there are Centos repositories with stuff like pure-ftpd:

http://packages.sw.be/pure-ftpd/

Also most importantly anything that works on RHEL will work on Centos, and maybe not Fedora.

Alright sounds good, I think I will go with Centos and just leave fedora for some random test stuff.


Thanks for the input

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Pram posted:

The stock packages are out of date and limited yes but there are Centos repositories with stuff like pure-ftpd:

http://packages.sw.be/pure-ftpd/

Also most importantly anything that works on RHEL will work on Centos, and maybe not Fedora.
EPEL's probably a better option because it follows the Fedora Packaging Guidelines and is a better upgrade candidate, though a lot of the RPMForge stuff is just more backports of Fedora packages anyway.

other people
Jun 27, 2004
Associate Christ
This isn't really a linux question, but where else would I ask?

The lady friend has to read/study lots of power point presentations for class. She wants to be able to print them out.

Seemingly easy, but she is never given the real power point files, just access to an "online" version of the presentation, which is a frameset. An index of all the slides is in the frame on the left, and the "slides" appear in the large frame on the right.

I could print out the right-hand frame over and over while loading each slide, but that is going to get old very quickly. Also, ideally there would be multiple slides per printed page.

I have been googling for a script or any tips on how to do this, but I am not coming up with anything.

Any ideas?

Modern Pragmatist
Aug 20, 2008

Kaluza-Klein posted:

This isn't really a linux question, but where else would I ask?

The lady friend has to read/study lots of power point presentations for class. She wants to be able to print them out.

Seemingly easy, but she is never given the real power point files, just access to an "online" version of the presentation, which is a frameset. An index of all the slides is in the frame on the left, and the "slides" appear in the large frame on the right.

I could print out the right-hand frame over and over while loading each slide, but that is going to get old very quickly. Also, ideally there would be multiple slides per printed page.

I have been googling for a script or any tips on how to do this, but I am not coming up with anything.

Any ideas?

When you right click on the slide on the right does it provide a context menu that indicates that it is an image? If so, I would imagine that they use a fairly standard naming scheme such as "slide1.jpg" etc.

If so, you could devise a script to use wget to pull all the slides as images.

other people
Jun 27, 2004
Associate Christ

Modern Pragmatist posted:

When you right click on the slide on the right does it provide a context menu that indicates that it is an image? If so, I would imagine that they use a fairly standard naming scheme such as "slide1.jpg" etc.

If so, you could devise a script to use wget to pull all the slides as images.

I wish! Looking now, they are loving VML files. I can't find any way to even render them in linux, let alone print them.

I wouldn't even know where to start writing a script on her windows machine.

edit: I found this very old script http://vectorconverter.sourceforge.net/ , hoping to convert the vml to a gif, but for whatever reason, it just outputs a blank gif every time :(. Fuckin' VML.

other people fucked around with this message at 18:13 on Feb 16, 2011

xPanda
Feb 6, 2003

Was that me or the door?
I have two linux questions!

1) I've recently been setting up some KVM virtualization on CentOS 5.5, and whilst testing all the VMs I set up on it I used a virtual network set up by virt-manager. Now that I'm deploying the machine, I'm changing the VMs to be bridged to the physical network, and followed the Redhat instructions for setting up a bridge interface (br0) on eth0. Now it seems that eth0 has become inactive (or at least is not assigned an IP), and even the host itself is using br0 for network connectivity. Naturally, the virtual network which NAT'd through eth0 no longer has network connectivity.
It doesn't matter in the long run, but my question is: why do I have to set up this bridge interface at all? Why couldn't the default eth0 do this sort of thing in the first place? It seems like additional hassle for something which should have been there in the first place.

2) CentOS 5.5 uses a version of libvirt which is going on 2 years old, and I'd rather run something more up to date for some later-added features. I sort of understand the philosophy of having these authoritative repositories with old, tried-and-tested packages to make support across a large network of machines more uniform. Is it a really bad idea to build your own package/RPM and deploy that? I understand there will be little-to-no community or documentation support, but are there more compelling reasons than that?
If I understand the concept correctly, one would ideally have all CentOS machines update their packages from an internal repository server controlled by an admin, who would push packages to this repository which would then be read from client machines on the network. Is this why CentOS/RHEL is the Right Way to do enterprise linux?

bort
Mar 13, 2003

xPanda posted:

Is it a really bad idea to build your own package/RPM and deploy that? I understand there will be little-to-no community or documentation support, but are there more compelling reasons than that?
Rolling your own RPMs can be fun and interesting, but it's not something you probably want to have to do down the road. When there's a patch/new features/vulnerability, you have a non-default process to update that particular package. It can make that server a tangled web and a pain to hand off to someone else (they will hate you, for whatever that's worth). As long as it's your own personal sandbox and has a short lifespan, I don't see why not.

Choosing CentOS is usually "I need functionality and stability more than the latest features, and I don't want to pay for RHEL." It's not the right way or the only way, it's a solid choice for a stable server. There's no reason you can't run Fedora or another distro if you like their packages better.

ExcessBLarg!
Sep 1, 2001

xPanda posted:

why do I have to set up this bridge interface at all? Why couldn't the default eth0 do this sort of thing in the first place?
Because standard Ethernet drivers don't supply bridging functionality, and frankly you wouldn't want them to. The current separation of bridge devices and connecting Ethernet devices gives much greater flexibility to how you setup your network.

There's two main ways to setup the network for the VMs: routed IP or bridged Ethernet. If your VMs are all on private networks with the host acting as a NAT gateway, you can set up the network either way. If the VMs all have public IPs in the same network segment (or at least, should have addresses accessible from outside the VM host), you're going to have to go with bridged Ethernet.

For routed IP, the host machine would have a physical Ethernet interface (eth0, with an IP), and a bunch of tunX (IP-level tunnel) interfaces (or whatever libvirt uses) corresponding to each VM session. Each VM would be assigned an address in its own private subnet (e.g., 192.168.X.2) and the tunX interfaces also assigned an address for each private subnet (e.g., 192.168.X.1). From there you enable IP forwarding on the host and NAT on eth0. This gives the VMs NAT access to outside the host, and the VMs can communicate with each other since they know to route packets through the host.

Bridged Ethernet makes the most sense when the VMs are assigned IP addresses from the same subnet, either private or public. Again, the host machine has a physical eth0 interface, and there's a bunch of tapX (Ethernet-level tunnel) interfaces corresponding to each VM session. Each VM is assigned an address in a common subnet (e.g., 192.168.0.X+2). The tapX interfaces on the host do not have an IP assigned. Instead, you create an Ethernet bridge (br0) with the tapX interfaces connected to it. If the VMs only need to communicate with each other, and not the host or the outside world, you're done.

However, to get the VMs to communicate with the host, you have to assign the host a single IP on the VM bridge network, so you assign an IP (e.g., 192.168.0.1) to the br0 interface--which is the host's "Ethernet" connection to the bridge. It wouldn't make sense to assign it to one of the tapX interfaces, since those are connections from the VMs. This is still separate from the public, outside network on eth0. But if you want the VMs to contact outside, you can do the same thing: enable IP fowarding and NAT eth0.

Now, if you want your VMs to have "public"-facing IPs (where "public" is either actually public, or IPs on a private network that's common to machines outside the host, i.e., there's no NAT), then you assign IP addresses to your VMs as before (or just have them do DHCP from an external DHCP server), create a bridge br0, and connect all the tapX devices and the external Ethernet (eth0) device to the same bridge. This connects everything together at the Ethernet level, so the VMs can pass frames to external hosts without the VM host having to serve as an IP router. In this setup there's no NAT because the host is not acting as a router. If you want the VM host also on that network, you would assign an IP to the bridge (br0) device. I think you could get away with assigning an IP to the eth0 interface instead if you want, it shouldn't really matter, but I don't think that's convention.

The problem, it sounds like, is that you want the VMs to be on a private network and have the VM host serve as a NAT gateway, so that the VMs can contact other machines but it's all coming from a single IP address as far as external hosts are concerned; but, you're creating an Ethernet bridge and bridging all the VM hosts to the outside at the Ethernet level which "bypasses" the NAT.

If so, the simplest solution is to keep the private network bridge, "disconnect" eth0 from it, and assign the VM host an IP on the private network and do NAT on eth0 (see second example). You could also dump the bridge entirely and go routed IP (first example), but that would involve reconfiguring the networks on the VMs. In theory the latter is more efficient if you can use tun interfaces instead of tap, but in practice it doesn't matter.

xPanda posted:

Is it a really bad idea to build your own package/RPM and deploy that?"
If you really need the new functionality, it's totally reasonable to backport a RHEL 6 (or whatever) RPM to 5.5. Basically this usually means compiling the source RPM with RHEL 5.5's libc and such. In the Debian world, there's backport repositories that provide updated packages specifically for this purposes, and it wouldn't surprise me if CentOS or something provided something similar.

xPanda posted:

Is this why CentOS/RHEL is the Right Way to do enterprise linux?
What you describe is how you would deal with such package distribution--but it's not RHEL/CentOS specific, folks do the same with Debian and Ubuntu too.

RHEL is the "Right Way" to do enterprise Linux because of support contracts and because it serves as a single target for proprietary software vendors to support. So if you're running Oracle, DB2, or something on Linux, you're probably stuck with RHEL/CentOS.

If you're not looking for a support contract and not running proprietary software, RHEL is no better than SuSE, Debian, Ubuntu LTS or something, except perhaps for operator familiarity.

ExcessBLarg! fucked around with this message at 18:31 on Feb 18, 2011

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Has anyone used Oracle Linux? They have released version 6 which is a free clone of RHEL 6 (take that, CentOS). I had no idea this even existed.

http://blogs.oracle.com/linux/2011/02/oracle_linux_6_dvds_now_available.html

http://forums.oracle.com/forums/forum.jspa?forumID=822

enotnert
Jun 10, 2005

Only women bleed

Bob Morales posted:

Has anyone used Oracle Linux? They have released version 6 which is a free clone of RHEL 6 (take that, CentOS). I had no idea this even existed.

http://blogs.oracle.com/linux/2011/02/oracle_linux_6_dvds_now_available.html

http://forums.oracle.com/forums/forum.jspa?forumID=822

I tend to feign away from anything oracle related as of this moment. No clue whats gonna happen next with them.

spiritual bypass
Feb 19, 2008

Grimey Drawer
Give Solaris a shot; it's pretty cool.

text editor
Jan 8, 2007

rt4 posted:

Give Solaris a shot; it's pretty cool.

Speaking of which, what is the big difference between Solaris express and OpenIndiana?

I know OpenIndiana is probably a ways behind Solaris Express but Solaris Express is a free Oracle product which probably means it has some kind of "limit of 2 daemons running at once" limitation.

covener
Jan 10, 2004

You know, for kids!

Bob Morales posted:

Has anyone used Oracle Linux? They have released version 6 which is a free clone of RHEL 6 (take that, CentOS). I had no idea this even existed.


I assessed it once; don't you still pay for maintenance just like RedHat?

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

ClosedBSD posted:

Speaking of which, what is the big difference between Solaris express and OpenIndiana?

I know OpenIndiana is probably a ways behind Solaris Express but Solaris Express is a free Oracle product which probably means it has some kind of "limit of 2 daemons running at once" limitation.
OpenIndiana is a community-run fork of OpenSolaris that happened around the time that the OpenSolaris Governing Board voted to dissolve themselves due to lack of communication from Oracle. It's now the foundation of most non-Oracle projects based on OpenSolaris, like Nexenta. The goal is to remain as compatible with Solaris as possible, while replacing the proprietary components of the OS with open-source ones.

Solaris Express is a development snapshot of Solaris 11, which is free to use as long as you don't put any production applications on it.

quote:

Except for any included software package or file that is licensed to you by Oracle under different license terms, we grant you a perpetual (unless terminated as provided in this agreement), nonexclusive, nontransferable, limited License to use the Programs only for the purpose of developing, testing, prototyping and demonstrating your applications, and not for any other purpose.

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams

Misogynist posted:

OpenIndiana is a community-run fork of OpenSolaris that happened around the time that the OpenSolaris Governing Board voted to dissolve themselves due to lack of communication from Oracle. It's now the foundation of most non-Oracle projects based on OpenSolaris, like Nexenta. The goal is to remain as compatible with Solaris as possible, while replacing the proprietary components of the OS with open-source ones.

Solaris Express is a development snapshot of Solaris 11, which is free to use as long as you don't put any production applications on it.

It's for developing your applications, but they haven't released Oracle Solaris Studio (Sun Studio) for 11 yet. :eng99:

Ninja Rope
Oct 22, 2005

Wee.

Bob Morales posted:

Has anyone used Oracle Linux? They have released version 6 which is a free clone of RHEL 6 (take that, CentOS). I had no idea this even existed.

http://blogs.oracle.com/linux/2011/02/oracle_linux_6_dvds_now_available.html

http://forums.oracle.com/forums/forum.jspa?forumID=822

It's good if you're trying to simplify your support contracts, but for a home user or anyone not running oracle apps on the machine I don't know why you'd want it. I haven't found anything different from RHEL about it.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Ninja Rope posted:

It's good if you're trying to simplify your support contracts, but for a home user or anyone not running oracle apps on the machine I don't know why you'd want it. I haven't found anything different from RHEL about it.
Supposedly they run a much more recent kernel with some performance enhancements, which would give them a small leg up on RHEL5 for certain applications like quantitative trading systems, but I don't see how it's relevant at all anymore now that RHEL6 is out with a modern kernel.

I don't mind seeing them monetize Linux, given that they're actually one of the larger corporate contributors to the Linux kernel, but I just don't see what value they add to the ecosystem since no other vendor besides Oracle supports them any more than they support CentOS.

ionn
Jan 23, 2004

Din morsa.
Grimey Drawer
How do I find physical RAM size on a linux machine? "free" (and all other tools I know that show RAM size, as well as /proc/meminfo) shows physical memory minus some stuff used by the kernel. The old and tried method of checking the size of /proc/kcore apparently no longer works, it says I have 128TiB.

The only way I've found which actually shows the right number is "dmesg|grep Memory", but that is not entirely stable since that line can't be seen after it has been running for a while.

Isn't there some reliable and fairly simple way to determine actual physical memory size?

covener
Jan 10, 2004

You know, for kids!

ionn posted:

How do I find physical RAM size on a linux machine? "free" (and all other tools I know that show RAM size, as well as /proc/meminfo) shows physical memory minus some stuff used by the kernel. The old and tried method of checking the size of /proc/kcore apparently no longer works, it says I have 128TiB.

The only way I've found which actually shows the right number is "dmesg|grep Memory", but that is not entirely stable since that line can't be seen after it has been running for a while.

Isn't there some reliable and fairly simple way to determine actual physical memory size?

dmidecode on pc-like hardware will show you module-by-module info if that helps.

ionn
Jan 23, 2004

Din morsa.
Grimey Drawer

covener posted:

dmidecode on pc-like hardware will show you module-by-module info if that helps.

I saw that trick too, but it seemed a little bit too messy to implement, and dmidecode needs to be run as root.

I might go with using whatever free (or /proc/meminfo) says, rounding up to the nearest "reasonable" memory size. I know it's x*2^n (in either MiB or GiB), where x is one of {1, 3, 9} and n is an integer. Either that, or just round up to the nearest gigabyte. It would work well in practice for my needs, but it's not proper.

ExcessBLarg!
Sep 1, 2001

ionn posted:

It would work well in practice for my needs, but it's not proper.
What's your need?

dmidecode is the exact answer to your question. But if you're just performing a machine/spec inventory of all the Linux boxes on a network, MemTotal (/proc/meminfo) rounded is probably the easiest obtainable answer.

/proc/kcore size, when it did "work" is still not entirely accurate. In recent kernels, similar information is available from the sum of DirectMap* (/proc/meminfo) entries. The problem is that on 4 GB+ (x86) machines, the amount of "physical memory" may be 0.5 GBish larger than actual as it includes the 32-bit MMIO address space since many BIOSes remap memory around it.

ionn
Jan 23, 2004

Din morsa.
Grimey Drawer

ExcessBLarg! posted:

What's your need?

In this case, input for automated inventory of all hardware (so it shows up as "32GB" instead if "31.49GB"), and also for some generation of configs that are dependent on the size of RAM. dmidecode would of course give an exact answer (provided you spend the effort to accurately grep out whatever is relevant and sum it up, and set up some ugly stuff to allow non-root users to get to it). However, "grep MemTotal /proc/meminfo" and just rounding up to the nearest even number of gigabytes will at least cover all relevant production servers. There are test servers / VMs with just 1 gig or less that will be a bit odd, but I'll deal with that crap later.

Of course, just using the slightly reduced value from /proc/meminfo would work well too, but I cannot possibly live with the fact that it isn't correct.

Prize Loser
Nov 28, 2005

It's casual Friday! Pants are optional!

ionn posted:

How do I find physical RAM size on a linux machine? "free" (and all other tools I know that show RAM size, as well as /proc/meminfo) shows physical memory minus some stuff used by the kernel. The old and tried method of checking the size of /proc/kcore apparently no longer works, it says I have 128TiB.

The only way I've found which actually shows the right number is "dmesg|grep Memory", but that is not entirely stable since that line can't be seen after it has been running for a while.

Isn't there some reliable and fairly simple way to determine actual physical memory size?

Can't you just run `dmesg|grep Memory > /tmp/physmem` at boot time and just read the value from there? Seems the simplest solution to me.

Longinus00
Dec 29, 2005
Ur-Quan

ionn posted:

In this case, input for automated inventory of all hardware (so it shows up as "32GB" instead if "31.49GB"), and also for some generation of configs that are dependent on the size of RAM. dmidecode would of course give an exact answer (provided you spend the effort to accurately grep out whatever is relevant and sum it up, and set up some ugly stuff to allow non-root users to get to it). However, "grep MemTotal /proc/meminfo" and just rounding up to the nearest even number of gigabytes will at least cover all relevant production servers. There are test servers / VMs with just 1 gig or less that will be a bit odd, but I'll deal with that crap later.

Of course, just using the slightly reduced value from /proc/meminfo would work well too, but I cannot possibly live with the fact that it isn't correct.

You could always round up to the nearest GB/MB.

Adbot
ADBOT LOVES YOU

Ninja Rope
Oct 22, 2005

Wee.
If you're doing hardware inventory you might as well dmidecode and catalog how many sticks of memory are in the host and what amount each one holds. If you're using memory hotplugging free might not match up with what the reality of modules on the box anyway, so dmidecode is probably the best answer anyway.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply