View Full Version : What version of FC3?

23rd November 2004, 04:49 PM
how can i tell what version of FC3 i have installed?

23rd November 2004, 04:59 PM
FC3 is the version, Fedora Core version 3. If you want know kernel version, run uname -a in terminal.

23rd November 2004, 05:22 PM
The -a argument will actually provide everything (which includes kernel). But if you want just the kernel, you would want uname -r.

23rd November 2004, 05:33 PM
cat /etc/redhat-release
will tell you the Version of your Fedora

23rd November 2004, 05:41 PM
'cat /proc/version' gives os version and gcc version :)

23rd November 2004, 06:11 PM
Or... you can use this simple program -> http://ghaefb.r8.org/projects.html

And yes it's cat /etc/redhat-release :)

24th November 2004, 04:17 AM
cool app ghaefb and yeah, checking the contents of redhat-release is what i was looking for, thanks ilja. mine is Fedora Core release 3 (Heidelberg). so i do not have one of the test versions correct? isnt there like FC3 test 1, FC3 test 2 and so on?

24th November 2004, 08:00 AM
Yes, you have the final version (or a manipulated content of /etc/redhat-release :p )

24th November 2004, 02:49 PM
:D thanks

25th November 2004, 10:56 AM
@ghaefb: To make your application more independent:

Release Information File

Novell SuSE /etc/SuSE-release
Red Hat /etc/redhat-release
Fedora /etc/fedora-release
Slackware /etc/slackware-release
Debian /etc/debian_release
Mandrake /etc/mandrake-release
Yellow dog /etc/yellowdog-release
Sun JDS /etc/sun-release
Solaris/Sparc /etc/release
Gentoo /etc/gentoo-release

... the rest (meminfo, cpuinfo etc.) is still the same ;)

25th November 2004, 04:10 PM
Many thanks Pegasus.
That's some great info.

I'm working on it right now :)

26th November 2004, 05:23 PM
Hi again ;)
I've seen that there is no network information in your sysinfo application.
Might be needful, so here's the code :D

The attached picture shows how it could look like...

// taken from pvt_sysinfo.c (Pegasus-2004)
#include <stdio.h>
#include <string.h>
#include <netinet/in.h>
#include <linux/sockios.h> // ioctl
#include <net/if.h> // if_nameindex
#include <unistd.h> // gethostname

#define NIPQUAD(addr) ((unsigned char *)&addr)[0],((unsigned char *)&addr)[1], ((unsigned char *)&addr)[2], ((unsigned char *)&addr)[3]

char theNetworkhostname[80];
char theNetworkipLO[40];
char theNetworkipETH0[40];
char theNetworkipETH1[40];
char theNetworkipPPP0[40];

void pvt_getNetworkinfo()
char buffer[40];
char hostname[80];
int sock = 0;
struct ifreq ifreq;
struct sockaddr_in *saptr = NULL;
struct if_nameindex *iflist = NULL, *listsave = NULL;

// prepare default values
strcpy(theNetworkhostname, "host -> Unknown");
strcpy(theNetworkipLO, "lo -> Unknown");
strcpy(theNetworkipETH0, "eth0 -> Unknown");
strcpy(theNetworkipETH1, "eth1 -> Unknown");
strcpy(theNetworkipPPP0, "ppp0 -> Unknown");

// get the hostname
if (gethostname(hostname,80) == 0)

// get socket for ioctl
sock = socket(AF_INET, SOCK_STREAM, 0);

//returns pointer to dynamically allocated list of structs
iflist = listsave = if_nameindex();

//walk thru the array returned and query for each interface adress
for(iflist; *(char *)iflist != 0; iflist++)
//copy in the interface name to look up address of
strncpy(ifreq.ifr_name, iflist->if_name, IF_NAMESIZE);

//get the address for this interface
if(ioctl(sock, SIOCGIFADDR, &ifreq) == 0)
//print out the address
saptr = (struct sockaddr_in *)&ifreq.ifr_addr;
sprintf(buffer,"%-5s :: %d.%d.%d.%d", ifreq.ifr_name, NIPQUAD(saptr->sin_addr.s_addr) );
if (strstr(ifreq.ifr_name,"lo"))
if (strstr(ifreq.ifr_name,"eth0"))
if (strstr(ifreq.ifr_name,"eth1"))
if (strstr(ifreq.ifr_name,"ppp0"))
//free the dynamic memory kernel allocated for us

27th November 2004, 02:00 PM
Thanks again.
I did the release info upgrade.
I will examine this code...