DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2013-03-15 10:20:32

Stranger
Member
Registered: 2012-04-30
Posts: 26

Network UPS Tools (SNMP-ups edition) needed

Hi, guys,

I asked there (http://dns323.kood.org/forum/viewtopic.php?id=7349) but nobody answered.

So I'm trying a chance here wink

Can somebody kindly compile and set as a package the network ups tools (NUT) with snmp-ups and CGI support (--with-snmp --with-cgi options) for my DNS-343 with ffp-0.7

NUT 2.6.5 here: https://github.com/networkupstools/nut
all mans here: http://buildbot.networkupstools.org/~bu … ing_source

P.S. And I do not know where to find libsnmp package or its files

Thanks a lot for your help,

Stranger

Last edited by Stranger (2013-03-16 21:27:03)


D-Link DNS-343/FW1.06/4x2GB(RAID5), ffp-0.7 on USB,
full nfs-support, mc 4.8.1.756, nano 2.2.6, iStat 0.5.8, Lighttpd 1.4.39, mySQL 5.1.61, php 5.5.1-dev,
*NIX Time Machine-like backup, net-snmp 5.7.2, nut 2.6.5 (snmp-ups),
ownCloud 4.0.2, Transmission 2.81

Offline

 

#2 2013-03-17 16:18:48

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Network UPS Tools (SNMP-ups edition) needed

Here you are: nut-2.6.5-arm-0.txz. It's at least dependent on libusb-1.0 and libgd, which are on the same page (and in slacker). libgd is dependent on libpng and libjpeg.

Let me know if you have developed any startscripts and configuration files, which can be added to the package.

Offline

 

#3 2013-03-19 22:21:17

Stranger
Member
Registered: 2012-04-30
Posts: 26

Re: Network UPS Tools (SNMP-ups edition) needed

Urah-urah-urah!!!

Thank you.

I'll test and report

P.S. Guys, you are like wizards!!!

Stranger


D-Link DNS-343/FW1.06/4x2GB(RAID5), ffp-0.7 on USB,
full nfs-support, mc 4.8.1.756, nano 2.2.6, iStat 0.5.8, Lighttpd 1.4.39, mySQL 5.1.61, php 5.5.1-dev,
*NIX Time Machine-like backup, net-snmp 5.7.2, nut 2.6.5 (snmp-ups),
ownCloud 4.0.2, Transmission 2.81

Offline

 

#4 2013-03-22 00:38:58

Stranger
Member
Registered: 2012-04-30
Posts: 26

Re: Network UPS Tools (SNMP-ups edition) needed

1. snmp-ups is working as well as net-snmp!

2. could not understand whether .cgi works

3. does somebody need a short instruction (for snmp configs)?

3. Please place the "/ffp/start/upsd.sh.new" script into appropriate path with rw-r--r-- (644)  permissions

Content of the "/ffp/start/upsd.sh.new":

#!/ffp/bin/sh
# Original by Stranger

# PROVIDE: upsd
# REQUIRE: none

. /ffp/etc/ffp.subr

name="upsd"
command="/ffp/sbin/upsd"
upsd_configuration="/ffp/etc/upsd.conf"
upsd_flags=""
required_files="/ffp/etc/ups.conf"

extra_commands="reload logstart logstop"
start_cmd="upsd_start"
stop_cmd="upsd_stop"
status_cmd="upsd_status"
check_cmd="upsd_check"
reload_cmd="upsd_reload"
logstart_cmd="upsd_logstart"
logstop_cmd="upsd_logstop"

# user settings
ups_name="your-ups-name-here"
upsdrvctl_command="/ffp/bin/upsdrvctl"
log_command="/ffp/bin/upslog"
log_file="/path/to/log-file.log"
log_format="%TIME @Y@m@d,@H@M@S%,%VAR battery.charge%,%VAR input.voltage%,%VAR ups.load%,[%VAR ups.status%],%VAR ups.temperature%,%VAR input.frequency%"
mon_command="/ffp/sbin/upsmon"

upsd_start()
{
    echo "Starting driver"
    $upsdrvctl_command start 2>&1
    echo "Starting ups data server"
    $command 2>&1
    echo "Starting ups monitoring..."
    $mon_command 2>&1
}

upsd_stop()
{
    echo "Stopping ups monitoring..."
    $mon_command -c stop
    echo "Stopping ups data server"
    [ $(pidof -g upsd) -gt 0 ] && $command -c stop 2>&1
    echo "Stopping driver"
    $upsdrvctl_command stop 2>&1

}

upsd_status()
{

    if [ $(pidof -g upsmon) -gt 0 ]; then
    echo "ups monitoring are running... with pids $(pidof upsmon)"
    else
    echo "ups monitoring are stopped"
    fi

    if [ $(pidof -g upsd) -gt 0 ]; then
    echo "upsd services are running... with pids $(pidof upsd)"
    else
    echo "upsd services are stopped"
    fi

    if [ $(pidof -g snmp-ups) -gt 0 ]; then
    echo "snmp-ups drivers are running... with pids $(pidof snmp-ups)"
    else
    echo "snmp-ups drivers are stopped"
    fi
}

upsd_reload()
{
    echo "Reloading upsmon configuration ..."
    $mon_command -c reload 2>&1

    echo "Reloading upsd configuration ..."
    $command -c reload 2>&1

}

upsd_logstart()
{
    echo "Starting log to file ${log_file}"
    $log_command -f "$log_format" -s $ups_name -l "$log_file" 2>&1

}

upsd_logstop()
{
    echo "Stopping log to file ${log_file}"
    if [ $(pidof -g upslog) -gt 0 ]; then
    echo "log service is running... stopping it..."
    kill -9 $(pidof upslog) 2>&1
   
    else
    echo "log service is not running"
   
    fi
}

run_rc_command "$1"

Last edited by Stranger (2013-03-22 23:58:51)


D-Link DNS-343/FW1.06/4x2GB(RAID5), ffp-0.7 on USB,
full nfs-support, mc 4.8.1.756, nano 2.2.6, iStat 0.5.8, Lighttpd 1.4.39, mySQL 5.1.61, php 5.5.1-dev,
*NIX Time Machine-like backup, net-snmp 5.7.2, nut 2.6.5 (snmp-ups),
ownCloud 4.0.2, Transmission 2.81

Offline

 

#5 2013-03-24 19:42:04

Stranger
Member
Registered: 2012-04-30
Posts: 26

Re: Network UPS Tools (SNMP-ups edition) needed

Some minor changes in files (in order to start the package smoothly...)

/ffp/etc/upssched.conf.sample:
change lines

# PIPEFN /var/state/ups/upssched/upssched.pipe
# LOCKFN /var/state/ups/upssched/upssched.lock

to
# PIPEFN /var/state/ups/upssched.pipe
# LOCKFN /var/state/ups/upssched.lock

file /ffp/etc/upsmon.conf.sample
change line

# NOTIFYCMD /usr/local/ups/bin/notifyme

to
# NOTIFYCMD /ffp/sbin/upssched


D-Link DNS-343/FW1.06/4x2GB(RAID5), ffp-0.7 on USB,
full nfs-support, mc 4.8.1.756, nano 2.2.6, iStat 0.5.8, Lighttpd 1.4.39, mySQL 5.1.61, php 5.5.1-dev,
*NIX Time Machine-like backup, net-snmp 5.7.2, nut 2.6.5 (snmp-ups),
ownCloud 4.0.2, Transmission 2.81

Offline

 

#6 2013-04-01 22:37:04

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Network UPS Tools (SNMP-ups edition) needed

I processed your suggestions in version #1:
http://downloads.zyxel.nas-central.org/ … S.html#nut

Offline

 

#7 2013-04-07 00:58:44

Stranger
Member
Registered: 2012-04-30
Posts: 26

Re: Network UPS Tools (SNMP-ups edition) needed

Thanks again.


D-Link DNS-343/FW1.06/4x2GB(RAID5), ffp-0.7 on USB,
full nfs-support, mc 4.8.1.756, nano 2.2.6, iStat 0.5.8, Lighttpd 1.4.39, mySQL 5.1.61, php 5.5.1-dev,
*NIX Time Machine-like backup, net-snmp 5.7.2, nut 2.6.5 (snmp-ups),
ownCloud 4.0.2, Transmission 2.81

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB