Configure the VCS hagui service

for those who feel comfortable with the hagui in Veritas Cluster, and cannot use it because you don’t have the daemon
running, you must add this section to your /etc/VRTSvcs/conf/config/main.cf:
group ClusterService (
SystemList = { hst101 = 0, hst102 = 1 }
AutoStartList = { hst101, hst102 }
OnlineRetryLimit = 3
Tag = CSG
)
IP webip (
Device = eth0
Address = “172.20.162.15”
NetMask = “255.255.254.0”
)
Where you need to change “hst101” and “hst102” to the hostnames of your nodes, and configure your
network interface accordingly.
Edit VCS main.cf using vi
Sometimes you need to edit your veritas cluster configuration file “main.cf” and you feel the urge to do it using vi, here’s
how to do it:
hastop -all
cp main.cf main.cf.copy
vi main.cf
hacf -verify /etc/VRTSvcs/conf/config
hacf -generate /etc/VRTSvcs/conf/config
hastart
262/433

Stats script based on top for Solaris

you can do this
(date “+%d %m %H %M %S %Y”
/usr/local/bin/top -b | head -4) >> /tmp/top.txt
Then parse and collect:
echo “date,time,loadavg1,loadavg5,loadavg10,processes,sleeping processes,on cpu,cpu idle,cpu user,cpu
kernel,cpu iowait,swap,memory,free mem,total swap,free swap”
cat /tmp/top.txt |nawk ‘ORS=NR%5?” “:”n”‘ | tr -d ‘[:alpha:]’| sed ‘s/;//g;s/:/ /g;s/,//g’ | awk ‘{ print
$1″/”$2″/”$6″,”$3″:”$4″:”$5″,”$8″,”$9″,”$10″,”$17″,”$18″,”$19″,”$20″,”$21″,”$22″,”$23″,”$24″,”$25″,”$26″,”$27”,”$28
}’
this builds a csv you can import in a spreadsheet
7/433

offline and online a cpu

If you want to disable a cpu in opensolaris:
root@cluster1:~# psradm -f 1
root@cluster1:~# psrinfo -v
Status of virtual processor 0 as of: 08/13/2009 10:10:45
on-line since 08/12/2009 04:00:42.
The i386 processor operates at 2993 MHz,
and has an i387 compatible floating point processor.
Status of virtual processor 1 as of: 08/13/2009 10:10:45
off-line since 08/13/2009 10:10:42.
The i386 processor operates at 2993 MHz,
and has an i387 compatible floating point processor.
And if you want to reenable it
root@cluster1:~# psradm -n 1
root@cluster1:~# psrinfo -v
Status of virtual processor 0 as of: 08/13/2009 10:11:35
on-line since 08/12/2009 04:00:42.
The i386 processor operates at 2993 MHz,
and has an i387 compatible floating point processor.
Status of virtual processor 1 as of: 08/13/2009 10:11:35
on-line since 08/13/2009 10:11:32.
The i386 processor operates at 2993 MHz,
and has an i387 compatible floating point processor.
71/433

Building gnophone

Problems building gnophone… solved using this:
http://forums.gentoo.org/viewtopic-t-118309-highlight-gnophone.html?sid=88ab1b0aa8bc97b17c3290be 0ed95817
i quote:
Odd that this problem should be the same now as it was when those other posts were made, but in case anyone else is
having this problem, here is how to make it compile:
there are two files with multi-line strings in them. GCC doesn’t seem to allow this… perhaps other versions do? I dunno.
Here is a diff of the file that ships with it, and the file fixed: (sounds/raw2h.c)
Code:
31c31,44
Signed 16-bit audio datan n
Source: %sn
n
Copyright (C) 1999, Mark Spencer and Linux Support Servicesn
n
Distributed under the terms of the GNU General Public Licensen
n
/nnnstatic signed short %s[] = {n”,
argv[1], n);

> fprintf(o,
> “/
>
Signed 16-bit audio data
>
>
Source: %s
>
>
Copyright (C) 1999, Mark Spencer and Linux Support Services
>
>
Distributed under the terms of the GNU General Public License
>
>
/
>
> static signed short %s[] = {
> “, argv[1], n);
(sounds/mkdtmf.c)
Code:
28c28,40
n Signed 16-bit audio data representing ‘%s’ in dtmfn
n
Copyright (C) 2000, Linux Support Services, Inc.n
n
Distributed under the terms of the GNU Generaln
Public Licensen
n
/nnstatic short %s[] = { n”, argv[1],
argv[2]);

> printf(
> “/
>
Signed 16-bit audio data representing ‘%s’ in dtmf
280/433
>
>
Copyright (C) 2000, Linux Support Services, Inc.
>
>
Distributed under the terms of the GNU General
>
Public License
>
> POSTS/
>
> static short %s[] = {
> “, argv[1], argv[2]);
then in src/gnophone_gui.c, below the line 1399, you need to add a line that says “break;” after the line with “default:” on
it.
Here is the diff:
Code:
1399d1398
Finally, some may have one last problem that I had. After some searching, it was found that the file:
/usr/include/linux/ixjuser.h line 353 needs to be changed from:
Code:
IXJ_CADENCE_ELEMENT __user *ce;
to
Code:
IXJ_CADENCE_ELEMENT __user, *ce;
after that, it should compile correctly. Maybe someday someone will make an ebuild that does this automatically, or
something. Hope this helps someone.
281/433