03-04-2008
Use Nmap as an example to follow
I am NOT a Unix guru, I am a waiter. And I never went to computer school, I figured it out as I went. And I never learned C, I read a few books from O'Reilly on C++, Perl, PHP, Korn shell. I do my scripting using text editor, no auto-generating sw.
What you are asking for, I can do it, on a Cisco router.
So, I am not the best resource for you.
But, if I were you, I would download Nmap from
http://download.insecure.org/nmap/dist/nmap-4.53.tgz
untar it, look through the .c and .h files, use them as an example.
Good luck doing your homework.
10 More Discussions You Might Find Interesting
1. Programming
Hi Experts,
I like to get the Key codes of the keys in the Keyboard while I press it.
Its something like scan code.
I want to know which key had been pressed.
Can anyone fine me a solution for this using C.
Regards
Anent (12 Replies)
Discussion started by: anent
12 Replies
2. UNIX for Dummies Questions & Answers
I've got a project that writing "find" C code in solaris.
That is finding a file in current and sub directories.
While I am looking for some example on the book for two days, but I have no idea where to start.
I think I need to use recursion, but is it true?
I am still a Unix... (2 Replies)
Discussion started by: SQ4LIFE
2 Replies
3. UNIX for Dummies Questions & Answers
I'm receiving an exit code 64 in our batch scheduler (BMC product control-m) executing a PERL script on UX-HP. Can you tell me where I can find a list of exit codes and their meaning. I'm assuming the exit code is from the Unix operating system not PERL. (3 Replies)
Discussion started by: jkuchar747
3 Replies
4. UNIX for Advanced & Expert Users
I have a simple script which renames a file.How do i capture the return code of the script if the script fails (3 Replies)
Discussion started by: kris01752
3 Replies
5. AIX
Dear Experts,
i am very to AIX when i am trying to compile my code i am getting two warning several times like
1540-0053 (W) The declaration of a class member within the class definition must not be qualified.
"/usr/include/alloca.h", line 34.9: 1540-1401 (I) An unknown "pragma __alloca" is... (1 Reply)
Discussion started by: vin_pll
1 Replies
6. UNIX for Dummies Questions & Answers
I just started learning about Unix and I cant figure out what im doing wrong. I'm trying to write a script that will ask for the file name and tell what type it is. This is what i have so far.
http://i63.photobucket.com/albums/h123/wacand/untitled.jpg (2 Replies)
Discussion started by: wacand
2 Replies
7. Shell Programming and Scripting
Hi,
I have to write s script to check an input file for invalid characters. In this script I have to find the exact line of the invalid character. If the input file contain 2 invalid character sat line 10 and 17, the script will show the value 10 and 17. Any help is appreciated. (3 Replies)
Discussion started by: beginner82
3 Replies
8. Shell Programming and Scripting
Hi All,
I need to write a script that will go through 600+ files and perform find and replace. I was going to use sed but there is a level of complexity that is doing my head in.
To explain: I have 600+ files that have a line in them that reads (for example)
FILE=DCLCLHST... (4 Replies)
Discussion started by: Kocko
4 Replies
9. Shell Programming and Scripting
how to find a job which is writing a big file and eating up space? (3 Replies)
Discussion started by: rush2andy
3 Replies
10. Shell Programming and Scripting
hello all!
well, here is my problem:
i have to write a script which waits for a directory as an argument and scans it recuresively and than it prints those files, which have write permission for everyone (as relative path from the argument directory so the find will be the key). and it shouldnt... (9 Replies)
Discussion started by: Mixe3y
9 Replies
LEARN ABOUT REDHAT
snmp-ups
snmp-ups(8) Network UPS Tools (NUT) snmp-ups(8)
NAME
snmp-ups - Driver for RFC 1628 SNMP UPS equipment
NOTE
This man page only documents the hardware-specific features of the snmp-ups driver. For information about the core driver, see nutups-
drv(8).
SUPPORTED HARDWARE
Any UPS that is RFC 1628 (UPS MIB) compliant.
EXPERIMENTAL DRIVER
This driver has been tagged experimental and is not built by default.
REQUIREMENTS
This driver needs UCD SNMP, aka Net-SNMP installed to compile successfully. See http://www.net-snmp.org/ for more information.
On Red Hat 7.2, these packages are required:
ucd-snmp-devel-4.2.3-1, ucd-snmp-4.2.3-1, ucd-snmp-utils-4.2.3-1
You must install SNMP-UPS-MIB.txt in your MIBs directory - typically /usr/share/snmp/mibs/, but it may vary from system to system. You can
generate this from chapter 4 of RFC 1628 (see http://www.faqs.org).
EXTRA ARGUMENTS
This driver supports the following optional settings in the ups.conf(5):
community=name
Set community name (default = public)
snmp_version=version
Set SNMP version (default = v1, the other allowed value is v2c)
INSTALLATION
This driver is not built by default. You can build it by using "configure --with-drivers=snmp-ups" before calling make.
IMPLEMENTATION
The hostname of the UPS is specified with the "port" value in ups.conf, i.e.:
[snmp]
driver = snmp-ups
port = snmp-ups.example.com
community = public
snmp_version = v1
SUPPORTED VARIABLES
INFO_MFR UPS Manufacturer
INFO_MODEL UPS Model
INFO_FIRMREV Firmware/Software Version
INFO_STATUS OFF, OL, OB, BOOST, TRIM
INFO_BATTPCT Battery percentage
INFO_RUNTIME Predicted runtime on battery
INFO_BATTVOLT Battery Voltage
INFO_OUTVOLT Output Voltage
PLANNED SUPPORT
INFO_UTILITY Input Voltage
INFO_ACFREQ AC Frequency
INFO_UPSTEM UPS Temperature
INFO_LOADPCT Load Percentage
CMD_? Not determined
AUTHORS
Arnaud Quette, Hans Ekkehard Plesser
SEE ALSO
The core driver:
nutupsdrv(8)
Internet resources:
The NUT (Network UPS Tools) home page: http://www.exploits.org/nut/
NUT mailing list archives and information: http://lists.exploits.org/
Tue Oct 22 2002 snmp-ups(8)