Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 3 Mar 2001 14:18:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 3 Mar 2001 14:18:08 -0500 Received: from leibniz.math.psu.edu ([146.186.130.2]:9941 "EHLO math.psu.edu") by vger.kernel.org with ESMTP id ; Sat, 3 Mar 2001 14:17:50 -0500 Date: Sat, 3 Mar 2001 14:17:48 -0500 (EST) From: Alexander Viro To: Michael Rothwell cc: Denis Perchine , linux-kernel@vger.kernel.org Subject: Re: Q: How to get physical memory size from user space without proc fs In-Reply-To: <200103031945.f23JjSQ22763@513.holly-springs.nc.us> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On 3 Mar 2001, Michael Rothwell wrote: > pyhsmem = `free | grep Mem | tr -s "/ / /" | cut -f2 -d" "` % strace free 2>&1 |grep /proc open("/proc/cpuinfo", O_RDONLY) = 3 open("/proc/uptime", O_RDONLY) = 3 open("/proc/stat", O_RDONLY) = 4 open("/proc/meminfo", O_RDONLY) = 5 I.e. it still uses procfs. Which is perfectly fine, just encapsulate it in initscripts so that information would be obtained when system is booted. Should work for people who don't want procfs around after that. Cheers, Al - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/