Archive for February 2006
Recursive Grep in Solaris
New component adoption
The new SNMP poller discovers components automatically and notify the data collector of any new or removed instances. For new components, the data collector can then create database records and RRD files. However, the poller knows nothing about dependencies, parents or relations to other components.
When the Datacollector needs to create new components, how does it know what the parent is?
A. per-class parent rule
- default: system component with same IP address
- bandwidth:
“bandwidth service” component with Name ending with company name which matches bandwidth component instance. E.g. Name of parent is “bandwidth Mizuho” / Instance of bandwidth is “GigabitEthernet3/40,fromCustomer”. This matches on Customer in both cases. We cannot use the Siebel or LDAP names of the companies since we are not in control of the policy names (the network team is).
B. Option to edit dependencies in GUI
Profiling a Perl program
It turns out Perl has decent profiling support:
bash-2.03# perl -d:DProf t/Agent.t
bash-2.03# dprofpp
Total Elapsed Time = 2.221144 Seconds User+System Time = 2.171144 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 24.3 0.529 0.529 90 0.0059 0.0059 SNMP::init_snmp 6.86 0.149 0.375 17 0.0088 0.0221 Smart24::InstanceMapper::BEGIN 5.20 0.113 0.113 2112 0.0001 0.0001 Smart24::OidMapper::passesFilter 4.15 0.090 0.314 6 0.0149 0.0523 Log::Agent::File::Rotate::BEGIN 3.68 0.080 0.208 5 0.0159 0.0415 Smart24::PollerVars::BEGIN 3.64 0.079 0.108 12 0.0066 0.0090 IO::BaseDeflate::BEGIN 3.22 0.070 0.070 12 0.0058 0.0058 DynaLoader::dl_load_file 3.18 0.069 0.069 146 0.0005 0.0005 Text::ParseWords::parse_line 3.04 0.066 0.089 229 0.0003 0.0004 YAML::_prewalk 2.76 0.060 0.079 19 0.0031 0.0042 YAML::BEGIN 2.30 0.050 0.363 2 0.0249 0.1816 Log::Agent::Driver::File::make 2.30 0.050 1.899 8 0.0062 0.2374 main::BEGIN 2.26 0.049 0.049 102 0.0005 0.0005 Exporter::import 1.80 0.039 0.087 15 0.0026 0.0058 Compress::Zlib::BEGIN 1.70 0.037 0.035 131 0.0003 0.0003 Log::Agent::Formatting::tag_format
Creating a postfix e-mail account
OK, I had to create a Decafe e-mail for our new QA team member, in the absense of any real sysadmin manpower… I just figured out how:
- Login to the mail server.
- Create a user account in the normal way (useradd -s /bin/bash [username], create homedir and chown to the new user)
- Edit /etc/postfix/aliases and add any aliases for this new user. One per line, e.g. a.user: user1. run “newaliases”.
That’s it.
Software images
Look on \\ip.ad.dr.ess\ (ending in old home number, btw)
for the Opsware install images.
You can browse from there using windows explorer