NissanDiesel forums

Nissan diesel engines, and the people who love them
It is currently Fri Jul 21, 2017 9:46 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 151 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11  Next
Author Message
 Post subject: Re: Server Blog
Post Number:#136  PostPosted: Wed Apr 01, 2015 5:50 pm 
Offline
Site Admin
User avatar

Joined: Sat Nov 26, 2005 7:28 am
Posts: 5271
Location: Duvall, Wash.
Margaritas!


Top
 Profile  
Reply with quote  
 Post subject: Re: Server Blog
Post Number:#137  PostPosted: Wed Apr 01, 2015 5:52 pm 
Offline

Joined: Fri Aug 31, 2007 6:49 am
Posts: 792
Location: Cochrane Alberta Canada
I'm in.

_________________
Retired Pauly
Problem with being retired is that you never get a day off.
1987 D21-J SD25 KC
KJLGD21FN


Top
 Profile  
Reply with quote  
 Post subject: Re: Server Blog
Post Number:#138  PostPosted: Fri Apr 03, 2015 6:22 am 
Offline

Joined: Sat Dec 03, 2005 12:34 pm
Posts: 726
Location: East Tennessee
Al,

Thanks again for this forum. I have not been much of a participant the last few years, but it is nice to know the resource is out there.

I don't see the Paypal donate button anymore.

Is your email still the same?

_________________
Matt B.

83 Maxima Sedan, LD28, 5 speed, white, 130k miles. My original Maxima.
83 Maxima Sedan converted from gasser, LD28, 5 speed, 2 tone blue, 230k miles
82 Maxima Sedan, LD28, 3 speed auto, 2 tone Gray/Silver, 140k miles
81 810 Sedan, LD28, 3 speed auto, rust, rust, and more rust!

2005 Jeep Liberty CRD


Top
 Profile  
Reply with quote  
 Post subject: Re: Server Blog
Post Number:#139  PostPosted: Fri Apr 03, 2015 7:26 am 
Offline
Site Admin
User avatar

Joined: Sat Nov 26, 2005 7:28 am
Posts: 5271
Location: Duvall, Wash.
goglio704 wrote:
Al,

Thanks again for this forum. I have not been much of a participant the last few years, but it is nice to know the resource is out there.

Too many of us invested too much of ourselves to not keep it around as a resource.

Quote:
I don't see the Paypal donate button anymore.


Sumbitch. I wonder when that happened? I've gotta fix that ASAP.

So few donations rolled in that I never noticed the lack. Paul donated Feb2014, and I think that was the last one.

Quote:
Is your email still the same?


Yup, since like 1993.

_________________
Regards,
Al S.

1982 Maxima diesel wagon, 2nd & 4th owner, 165k miles, rusty & burgundy/grey. Purchased 1996, SOLD 16Feb10
1983 Maxima diesel wagon, 199k miles, rusty, light yellow/light brown. SOLD 14Jul07
1981 720 SD22 (scrapped 04Sep07)
1983 Sentra CD17, 255k, bought 06Jul08, gave it away 22Jun10.


Top
 Profile  
Reply with quote  
 Post subject: Re: Server Blog
Post Number:#140  PostPosted: Fri Apr 03, 2015 10:53 am 
Offline
Site Admin
User avatar

Joined: Sat Nov 26, 2005 7:28 am
Posts: 5271
Location: Duvall, Wash.
Donate button for PayPal has been restored. It was knocked out by the forum software upgrade of 13Mar2015.

_________________
Regards,
Al S.

1982 Maxima diesel wagon, 2nd & 4th owner, 165k miles, rusty & burgundy/grey. Purchased 1996, SOLD 16Feb10
1983 Maxima diesel wagon, 199k miles, rusty, light yellow/light brown. SOLD 14Jul07
1981 720 SD22 (scrapped 04Sep07)
1983 Sentra CD17, 255k, bought 06Jul08, gave it away 22Jun10.


Top
 Profile  
Reply with quote  
 Post subject: Re: Server Blog
Post Number:#141  PostPosted: Wed Jun 03, 2015 8:31 pm 
Offline
Site Admin
User avatar

Joined: Sat Nov 26, 2005 7:28 am
Posts: 5271
Location: Duvall, Wash.
I lost another power supply today. I just happened to notice when walking by the server room that it seemed kinda quiet.

I had a spare power supply loose (and two complete spare identical computers sitting idle), so I grabbed the spare PS and installed it. The desktop is now at a resolution that my monitors find "out of range", but using VNC I can see that everything's running. I'll have to take the server down and fix that sometime, but for now we're up again.

I believe that's the third power supply failure we've had since this forum started in 2006.

_________________
Regards,
Al S.

1982 Maxima diesel wagon, 2nd & 4th owner, 165k miles, rusty & burgundy/grey. Purchased 1996, SOLD 16Feb10
1983 Maxima diesel wagon, 199k miles, rusty, light yellow/light brown. SOLD 14Jul07
1981 720 SD22 (scrapped 04Sep07)
1983 Sentra CD17, 255k, bought 06Jul08, gave it away 22Jun10.


Top
 Profile  
Reply with quote  
 Post subject: Re: Server Blog
Post Number:#142  PostPosted: Thu Jun 04, 2015 1:09 pm 
Offline

Joined: Fri Aug 31, 2007 6:49 am
Posts: 792
Location: Cochrane Alberta Canada
Thanks for performing CPR !

Or is it a transplant ??

Regardless
Thanks.

_________________
Retired Pauly
Problem with being retired is that you never get a day off.
1987 D21-J SD25 KC
KJLGD21FN


Top
 Profile  
Reply with quote  
 Post subject: Re: Server Blog
Post Number:#143  PostPosted: Wed Jun 24, 2015 5:03 pm 
Offline
User avatar

Joined: Sun Jun 03, 2007 11:09 am
Posts: 184
Location: Oracle, AZ
Power supply failure may happen due to restricted airflow and over-heating. Dust collects inside and slowly disables the cooling effect of the fan. That happen to our servers at work also.

_________________
Astro Van with LD28 propulsion
'84 Mercedes 190D 2.2L 5-Speed Manual purchased 06/12 SOLD 06/13
'86 Ford Escort Wagon Diesel MT Sold 07-17-08


Top
 Profile  
Reply with quote  
 Post subject: Re: Server Blog
Post Number:#144  PostPosted: Wed Jun 24, 2015 5:21 pm 
Offline
Site Admin
User avatar

Joined: Sat Nov 26, 2005 7:28 am
Posts: 5271
Location: Duvall, Wash.
Not here.

I take every computer outside and blow it out with compressed air with the covers off, 2x per year.

The PS I removed had a fan I installed in it in 2011, much quieter than the OEM one and it was still spinning when the PS died. The PS was very clean inside, I took it all apart before I trashed it.

I have purchased another Corsair CX600 and will do the mod that I did on one of the other, identical boxes I use here at home. See this post for pics of the previous mod.

_________________
Regards,
Al S.

1982 Maxima diesel wagon, 2nd & 4th owner, 165k miles, rusty & burgundy/grey. Purchased 1996, SOLD 16Feb10
1983 Maxima diesel wagon, 199k miles, rusty, light yellow/light brown. SOLD 14Jul07
1981 720 SD22 (scrapped 04Sep07)
1983 Sentra CD17, 255k, bought 06Jul08, gave it away 22Jun10.


Top
 Profile  
Reply with quote  
 Post subject: Cable modem rebooting
Post Number:#145  PostPosted: Fri Oct 16, 2015 3:23 pm 
Offline
Site Admin
User avatar

Joined: Sat Nov 26, 2005 7:28 am
Posts: 5271
Location: Duvall, Wash.
A few weeks ago, I mentioned:
Quote:
After a while, the inbound http requests do not make it to the server. It seems to be an issue with the ISP. Power-cycling the cable modem restores this.

I'm looking into implementing an automated power cycle on that modem. It's plugged into an APC MasterSwitch, and I need to look at that unit's management console to see if scheduled power cycling is an option.


I've put together and implemented a way to programmatically get the APC MasterSwitchPlus to power cycle the outlet into which the cable modem is plugged, and I've added the script as a cron job to execute at the same time as a scheduled reboot of the Apache web daemon httpd (ie at 0001 PST every morning).

It works from the commandline. Tomorrow, I will check to see if it worked as a scheduled job.

The single core line was copied -- thanks, apex!

For my own benefit, to refer to later, what I've done is listed below.

=================================

I was looking for more-or-less a one-liner, but things are often not as simple as they'd appear. I've around twelve hours into this.

I went with the php solution. To reboot the cable modem on outlet number 8, I call this script like this:

[f:\php5] php -c .\php.ini -f <path/to/script.php> 192.168.0.52 <password> 8 5

script.php:

Code:
<?php
/*
Created: 12Oct2015 ALS
Revised: 16Oct2015 ALS
PHP code to reboot an outlet on AP9225 w/AP9617 management card. Probably works OK with other NMCs such as AP9606, AP9618, AP9619.
Partly based around example code by apex at http://www.forked.net/forums/viewtopic.php?f=13&t=3490#p4131

Some documentation:

OID (Object ID) for MasterSwitch+ AP9225 = .1.3.6.1.4.1.318.1.1.6.5.1.1.5.1.1.

   Defining the first bits:
   1.3.6.1.4.1.318.1.1.6.5.1.1.5
   iso . org . dod . internet . private . enterprises . apc . products . hardware . masterswitchMSP . sPDUOutletControlMSP . sPDUOutletControlMSPTable . sPDUOutletControlMSPEntry . sPDUOutletControlMSPOutletCommand
   
   Getting this variable will return the outlet state. If the outlet is on, the immediateOnMSP (1) value will be returned.
   If the outlet is off, the immediateOffMSP (3) value will be returned.

   Setting this variable to:
      immediateOnMSP (1) will immediately turn the outlet on.
      delayedOnMSP (2) will turn the outlet on after the sPDUOutletConfigMSPPowerOnDelay OID time has elapsed.
      immediateOffMSP (3) will immediately turn the outlet off.
      gracefulRebootMSP (4) will cause the outlet to wait for device confirmation
         (if applicable) and then turn the outlet off after the sPDUOutletConfigMSPPowerOffDelay
         OID time has elapsed.  The outlet will then turn on after the sPDUOutletConfigMSPRebootDuration OID time has elapsed.
      immediateRebootMSP (5) will immediately reboot the outlet.
      gracefulshutdownMSP (6) will cause the outlet to wait for device confirmation
         (if applicable) and then turn the outlet off after the sPDUOutletConfigMSPPowerOffDelay OID time has elapsed. 
         The outlet will then turn on after the sum of the sPDUOutletConfigMSPRestartTime OID time and the
         sPDUOutletConfigMSPPowerOnDelay OID time has elapsed.
      overrideBatCapThreshMSP (7) will cause the outlet to ignore the Battery Capacity Threshold
         and proceed waiting on the sPDUOutletConfigMSPPowerOnDelay OID time before turning the outlet on.
      cancelPendingCommandMSP (8) will cause any pending command to this outlet to be cancelled.

 For now, I do not know what the trailing ".1.1." mean.

 */

$oid = ".1.3.6.1.4.1.318.1.1.6.5.1.1.5.1.1." ; // AP9225
array_shift($argv); // Remove the first argument, which is always the script's name as called on the commandline.
echo "\r\n";  // Gain some separation from whatever may be on the screen.

if (empty($argv) || count($argv) != 4) {   // Check for the correct number of commandline arguments.
  echo "Incorrect number of arguments.\n";
  echo "Usage: MSP_Control IP password outlet action \r\n";
  echo "where:\r\n";
  echo "    IP       = IP address (eg 192.168.0.52) \r\n";
  echo "    password = password for a SNMP account in the AP9225 that has write authority\r\n";
  echo "    outlet   = integer that represents the outlet to be controlled (1..8)\r\n";
  echo "    action   = integer that represents the action to be performed: \r\n";
  echo "                1 = immediate power on          \r\n";
  echo "                2 = delayed   power on          \r\n";
  echo "                3 = immediate power off         \r\n";
  echo "                4 = graceful  reboot            \r\n";
  echo "                5 = immediate reboot            \r\n";
  echo "                6 = graceful  power off delayed \r\n";
  echo "                8 = cancel pending command      \r\n";
 
exit(1);   // End script; return a code for wrong arguments.
}

/* debug section
$host = "192.168.0.52" ;     // My test AP9225
$community = "private" ;     // Default password -- this should always be changed.
$outlet = "8" ;              // My cable modem is plugged into outlet #8.
$action = "5" ;              // 5 = reboot.

echo "var_dump after constants:\r\n";
echo var_dump($host, $community, $outlet, $action) . "\r\n";
*/

$host      = (string)$argv[0];
$community = (string)$argv[1];
$outlet    = (string)$argv[2];
$action    = (string)$argv[3];

// Input validation checks.  This should be enlarged/expanded/fleshed out if needed for robustness.
if ($outlet < 1 || $outlet > 8) {   // Test for valid outlet number.
   echo "Argument 'outlet' out of range.\r\n";
   echo "Must be an integer from this set: [1, 2, 3, 4, 5, 6, 7, 8].\r\n";
   exit(3);
}

$action_test = (int)$action;  // Cast to int to test using numeric comparisons.
if ($action_test < 1 || $action_test == 7 || $action_test > 8) {
   echo "Argument 'action' out of range.\r\n";
   echo "Must be an integer from this set: [1, 2, 3, 4, 5, 6, 8].\r\n";
   exit(4);
}

switch ($action) {                 // set up text for feedback later.
      case 1:
         $action_text = "immediate power on";
         break;
      case 2:
         $action_text = "delayed power on";
         break;
      case 3:
         $action_text = "immediate power off";
         break;
      case 4:
         $action_text = "graceful reboot";
         break;
      case 5:
         $action_text = "immediate reboot";
         break;
      case 6:
         $action_text = "graceful power off then delayed power on";
         break;
      case 8:
         $action_text = "cancel pending command";
         break;
}

$returncode = snmpset($host, $community, $oid.$outlet , "i", $action) ;

// debug section
// echo "returncode = " . $returncode . "\r\n";

if ($returncode) {
   echo "Succeeded: " . $action_text . " MasterSwitch+ outlet No. " . $outlet . ".\r\n";
   exit(0);
   }
else {
   echo "Failed: " . $action_text . " MasterSwitch+ outlet No. " . $outlet . ".\r\n";
   exit(2);
   }

?>

_________________
Regards,
Al S.

1982 Maxima diesel wagon, 2nd & 4th owner, 165k miles, rusty & burgundy/grey. Purchased 1996, SOLD 16Feb10
1983 Maxima diesel wagon, 199k miles, rusty, light yellow/light brown. SOLD 14Jul07
1981 720 SD22 (scrapped 04Sep07)
1983 Sentra CD17, 255k, bought 06Jul08, gave it away 22Jun10.


Top
 Profile  
Reply with quote  
 Post subject: Re: Server Blog
Post Number:#146  PostPosted: Sat Oct 17, 2015 10:42 am 
Offline
Site Admin
User avatar

Joined: Sat Nov 26, 2005 7:28 am
Posts: 5271
Location: Duvall, Wash.
Last night, the cable modem rebooted on schedule without issue. Just the way I like it!

_________________
Regards,
Al S.

1982 Maxima diesel wagon, 2nd & 4th owner, 165k miles, rusty & burgundy/grey. Purchased 1996, SOLD 16Feb10
1983 Maxima diesel wagon, 199k miles, rusty, light yellow/light brown. SOLD 14Jul07
1981 720 SD22 (scrapped 04Sep07)
1983 Sentra CD17, 255k, bought 06Jul08, gave it away 22Jun10.


Top
 Profile  
Reply with quote  
 Post subject: Re: Server Blog
Post Number:#147  PostPosted: Tue Jan 26, 2016 8:00 pm 
Offline
Site Admin
User avatar

Joined: Sat Nov 26, 2005 7:28 am
Posts: 5271
Location: Duvall, Wash.
Today, I found that though the cable modem is power cycled every night, the router stops forwarding requests (from the world, to the web server) every so often as well. Outbound continues to work fine, so it all "looks" fine here at home.

Since the script to power cycle outlets on the MasterSwitch+ is already written, I just added a line to reboot the router's power outlet too, at the same time as the modem.

Now, they're both get power cycled every night. Let's see if that helps.

_________________
Regards,
Al S.

1982 Maxima diesel wagon, 2nd & 4th owner, 165k miles, rusty & burgundy/grey. Purchased 1996, SOLD 16Feb10
1983 Maxima diesel wagon, 199k miles, rusty, light yellow/light brown. SOLD 14Jul07
1981 720 SD22 (scrapped 04Sep07)
1983 Sentra CD17, 255k, bought 06Jul08, gave it away 22Jun10.


Top
 Profile  
Reply with quote  
 Post subject: Re: Server Blog
Post Number:#148  PostPosted: Wed Jan 27, 2016 7:55 pm 
Offline

Joined: Fri Aug 31, 2007 6:49 am
Posts: 792
Location: Cochrane Alberta Canada
Question for you Al.
Today , on my phone, I Google searched "Nissan dyndns" as I always do and it displays the page with " discuss and cuss" etc.
Today however that link is not there when I search and the only way I seem to be able to get in is by clicking on a link sent with an auto reply to a topic I have been involved with.
Has the link to the site been removed from Google somehow ?
Thanks for keeping us alive.

Paul

_________________
Retired Pauly
Problem with being retired is that you never get a day off.
1987 D21-J SD25 KC
KJLGD21FN


Top
 Profile  
Reply with quote  
 Post subject: Re: Server Blog
Post Number:#149  PostPosted: Wed Jan 27, 2016 8:13 pm 
Offline
Site Admin
User avatar

Joined: Sat Nov 26, 2005 7:28 am
Posts: 5271
Location: Duvall, Wash.
I can't say. I almost never try using Google to find the site, and last time I looked, it came up on page two (which nobody reads). Now not even page three.

Nobody knows we're here :)

_________________
Regards,
Al S.

1982 Maxima diesel wagon, 2nd & 4th owner, 165k miles, rusty & burgundy/grey. Purchased 1996, SOLD 16Feb10
1983 Maxima diesel wagon, 199k miles, rusty, light yellow/light brown. SOLD 14Jul07
1981 720 SD22 (scrapped 04Sep07)
1983 Sentra CD17, 255k, bought 06Jul08, gave it away 22Jun10.


Top
 Profile  
Reply with quote  
 Post subject: Re: Server Blog
Post Number:#150  PostPosted: Wed Jan 27, 2016 9:13 pm 
Offline

Joined: Fri Aug 31, 2007 6:49 am
Posts: 792
Location: Cochrane Alberta Canada
Stealth mode !

Edit :

Well that's damned peculiar. I come home and flash up the PC, do the Nissan dyndns search on the mighty Google and there it is.
Try it on my phone and there it is.

When I tried it earlier I was at the airport picking up some people and was signed on to their WiFi. Not sure how or why it ended up as a different result but it did.

In any event
Please disregard message #148 about us not being there, because apparently we are.

_________________
Retired Pauly
Problem with being retired is that you never get a day off.
1987 D21-J SD25 KC
KJLGD21FN


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 151 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group