Results 1 to 5 of 5
heya!
I would like know in which file is the machine name, os type and processor architecture stored in??
I wouldl like to know the path to those files where ...
- 04-22-2010 #1Just Joined!
- Join Date
- Mar 2010
- Posts
- 8
help in searching the path of some basic HW values
heya!
I would like know in which file is the machine name, os type and processor architecture stored in??
I wouldl like to know the path to those files where the value for os is i386 and machine i686 is something like this..... in which file the systemuser and the number of users of that system is stored
/usr/src/redhat/RPMS/ ... in these files i686 and i 386 is stored as directories and not as values....
but i want them as values in the file
- 04-22-2010 #2
hostname:
cat /etc/sysconfig/network
hostname
uname -n
os type:
Hmm, linux?
The release number is here
cat /etc/redhat-release
processor architecture
cat /proc/cpuinfo
dmidecode
i386 or i686
Can be judged from the processor architecture
systemuser(s)
cat /etc/passwd
wc -l /etc/passwd
It is possible to store users in other places like ldapYou must always face the curtain with a bow.
- 04-22-2010 #3Just Joined!
- Join Date
- Mar 2010
- Posts
- 8
Thank you ....
but the problem is system calls are not supported... the command cant be used....so im keen on knowing the pathnames of the files that store all these values....
/proc/sys/kernel/ostypes ... this gives me the kernel name....
simillary i wanted to know file pathanmes that gives me the machine architecture and os type... whose values are i386 and i686..... which we get using the uname -i and uname -m
/etc/passwd this gives a list of users ..... but I need the file that contains the current user name and his UID userNumber in a file??
please help...
- 04-24-2010 #4Just Joined!
- Join Date
- Mar 2010
- Posts
- 8
Hello!
In the previous post i meant to ask OS name.... where is that name stored in which file??
on executing this program im getting segmentation fault....
I dont whats wrong in declaration of variables.....
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<string.h>
int main()
{
FILE * buf, *out;
char var[500];
char os[100];
system("uname -o > out");
buf=fopen("out","r");
while(fgets(var,sizeof(var),buf));
{
strcpy(os,var);
printf("os is: %s",os);
}
rewind(out);
fclose(buf);
return 0;
}
- 04-24-2010 #5
Test your pointers...
- Clouds don't crash - Bertrand Meyer
registered Linux user 393557
finally - hw to brag about - but next year it will look pitifully quaint:
Athlon64 X2 3800 - 1G PC3200 - 250G SATA - ati radeon x300
circa 2006


Reply With Quote
