2 atlc - arbitrary transmission line calculator, for the analysis of
3 transmission lines are directional couplers.
5 Copyright (C) 2002. Dr. David Kirkby, PhD (G8WRB).
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either package_version 2
10 of the License, or (at your option) any later package_version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
22 Dr. David Kirkby, e-mail drkirkby@ntlworld.com
25 /* Try to get data. This will work only on a IRIX machine. */
38 #include <sys/types.h>
48 int try_irix(struct computer_data *data)
60 /* Obtain the maximum number of CPUs supported on the IRIX system */
62 /* Obtain the number of CPUs online on the IRIX system */
65 CPUs_online=(long) sysconf(_SC_NPROC_ONLN);
66 if( CPUs_online >= 1 )
67 sprintf(data->cpus,"%ld ",CPUs_online);
72 /* Obtain the of CPU and FPU on the IRIX box */
73 setinvent(); /* Always call before starting to call getinvt() */
75 while ( (invp = getinvent()) ) {
76 if ( (invp->inv_class == INV_PROCESSOR) && (invp->inv_type == INV_CPUBOARD))
77 sprintf(data->mhz,"%d",(int) invp->inv_controller);
78 if ( (invp->inv_class == INV_PROCESSOR) && (invp->inv_type == INV_CPUCHIP))
79 sprintf(data->cpu_type,"%d",invp->inv_state);
80 if ( (invp->inv_class == INV_PROCESSOR) && (invp->inv_type == INV_FPUCHIP) && invp->inv_state)
81 sprintf(data->fpu_type,"%d",invp->inv_state);
83 /* Obtain the RAM, cache etc on the IRIX system. */
85 setinvent(); /* Always call before starting to call getinvt() */
86 while ((invp = getinvent()))
88 if (invp->inv_class == INV_MEMORY && (invp->inv_type == INV_MAIN_MB))
89 sprintf(data->memory,"%d", invp->inv_state);
90 if (invp->inv_class == INV_MEMORY && (invp->inv_type == INV_DCACHE))
91 sprintf(data->L1data,"%d", invp->inv_state/1024);
92 if (invp->inv_class == INV_MEMORY && (invp->inv_type == INV_ICACHE))
93 sprintf(data->L1instruction,"%d", invp->inv_state/1024);
94 if (invp->inv_class == INV_MEMORY && (invp->inv_type == INV_SIDCACHE))
95 sprintf(data->L2,"%d", invp->inv_state/1024);
96 if (invp->inv_class == INV_MEMORY && (invp->inv_type == INV_SIDCACHE))
97 sprintf(data->L2,"%d", invp->inv_state/1024);
101 /* Obtain the manufacturer */
102 sprintf(data->hw_provider,"SGI");
104 return(PROBABLY_IRIX);