Unable to install nicstat on solaris

675 views Asked by At

I am new solaris and trying to install nicstat tool on the solaris for monitoring the network.

I have downloaded the source code of the nicstat from the link http://sourceforge.net/projects/nicstat/files/?source=navbar

I have followed the instructions as per the README.txt.

during make, only make in the current directory(where I source code of nicstat is present) was giving error. I have tried with /usr/sfw/bin/gmake ./ then I got the error as

cc     -lsocket -lkstat -lrt `./dladm.sh lib` -o .o
/bin/sh: ./dladm.sh: cannot execute
/bin/sh: cc: not found

I have googled around the error of ./dladm but very less documentation is available.

cc command not found but if I try like /usr/sfw/bin/gcc in terminal then it works.

Anybody have idea about it.

1

There are 1 answers

0
James McPherson On

/bin/sh: cc: not found is the biggy - it means that you haven't got a C compiler installed, or if you do, it's not in your $PATH.

Also, gmake ./ is in incorrect command line, because args to make or gmake are supposed to be targets - the current directory is not a target. A simple make all or gmake all is most likely what you need, unless you want to specify a different BASEDIR - that's listed in the README.txt.

In order for 'dladm.sh' and 'nicstat.sh' to be executable, you need to utter

chmod +x dladm.sh nicstat.sh

I couldn't be bothered renaming the Makefile.Solaris, so I just ran make like this:

nicstat-src-1.95 $ gmake -f Makefile.Solaris 

That gave me this output:

cc -g -xO3 -D_REENTRANT ./dladm.sh def nicstat.c -lsocket -lkstat -lrt ./dladm.sh lib -o nicstat mv nicstat ./nicstat.sh --bin-name

which seemed to be sufficient for me to run the utility and get numbers that looked sane for my environment.