Archlinux server status script in PHP

Screenshot: http://www.barrucadu.co.uk/server/serverstatus.png
This script shows system information (you'll have to tweak the commands using sensors for your system), and daemons. Also displays a notice if a daemon isn't running. I've divided its display of daemons into three parts - all, services, and utilities. I've called a daemon a service if the outside world benefits directly from it, and a utility if it's more of an internal thing. For example, samba would be a service and crond a utility.
PHP script:
<?php
function daemon_running($daemon)
$checkpath = '/var/run/daemons';
return exec("ls -l {$checkpath} | grep {$daemon}");
$name = 'Eihort';
$statuses = array('Northbridge fan speed' => array('', 'sensors | grep fan1 | sed -e "s/fan1:\s*\([0-9]*\).*/\\1/"', ' RPM'),
'CPU temperature' => array('', 'sensors | grep temp3 | sed -e "s/temp3:\s*+\([0-9]*\).*/\\1/"', '°C'),
'HDD temperature' => array('', 'sudo hddtemp -n /dev/sda', '°C'),
'Memory usage' => array('', 'free -m | grep "buffers/cache" | sed -e "s/-\/+ buffers\/cache:\s*\([0-9]*\)\s*\([0-9]*\).*/\\1 \/ \\2/"', ' MB'),
'Load averages' => array('', 'uptime | sed "s/.*load average: \(.*\)/\\1/"', ''),
'Uptime' => array('', 'uptime | sed "s/.*up\s*\([0-9\:]*\).*/\\1/"', ''),
'Package updates' => array('', '/usr/local/bin/updates', ''),
'Logged in users' => array('', '/usr/local/bin/userson', ''));
$services = array('bitlbee' => 'Instant messaging gateway.',
'httpd' => 'The Apache web server.',
'mysqld' => 'MySQL Database server.',
'named' => 'BIND9 DNS server.',
'openntpd' => 'Network time server.',
'rtorrent' => 'Torrent client,',
'samba' => 'File-sharing system.',
'sshd' => 'Secure Shell',
'vsftpd' => 'Very Secure FTP Daemon.');
$utilities = array('ivman' => 'Volume manager.',
'sensors' => 'Hardware monitor.',
'net-profiles' => 'Network manager.',
'crond' => 'Task scheduler.',
'hal' => 'Hardware Abstraction Layer.',
'dbus' => 'IPC Bus.',
'syslog-ng' => 'System monitor.',
'uptimed' => 'Uptime recorder.');
$output = array('status' => array(),
'services' => array(),
'utilities' => array());
foreach($statuses as $status => $details)
$output['status'][] = array($status, $details[0] . shell_exec($details[1]) . $details[2]);
foreach($services as $service => $description)
$output['services'][] = array($service, daemon_running($service) ? "On" : "Off");
foreach($utilities as $utility => $description)
$output['utilities'][] = array($utility, daemon_running($utility) ? "On" : "Off");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf8"/>
<meta name="author" content="Michael Walker"/>
<meta name="robots" content="FOLLOW,INDEX"/>
<title><?php echo $name; ?> Status</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div id="header">
<h1><?php echo $name; ?></h1>
<table>
<?php
$half = count($output['status']) / 2;
for($i = 0; $i < count($output['status']); $i ++)
if($i == $half) echo '</table><table>';
$j = ($i < $half) ? $i + $half : $i - $half;
echo '<tr>';
echo "<td class=\"head\">{$output['status'][$j][0]}</td>";
echo "<td>{$output['status'][$j][1]}</td>";
echo '</tr>';
?>
</table>
</div>
<ul id="tabs">
<li><a href="/">All</a></li>
<li><a href="/?type=services">Services</a></li>
<li><a href="/?type=utilities">Utilities</a></li>
</ul>
<div id="content">
<table>
<?php
$pool = array_merge($output['services'], $output['utilities']);
if(isset($_GET['type']) && isset($output[$_GET['type']])) {
$pool = $output[$_GET['type']];
$odd = True;
foreach($pool as $info)
$summary = (isset($services[$info[0]])) ? $services[$info[0]] : $utilities[$info[0]];
echo ($odd) ?'<tr class="odd">' : '<tr>';
echo "<td class=\"head\">{$info[0]}<br/><span class=\"summary\">{$summary}</span></td>";
echo ($info[1] == "On") ? '<td class="good">Up</td>' : '<td class="bad">Down</td>';
echo '</tr>';
$odd = !$odd;
?>
</table>
</div>
</body>
</html>
This is configured for my server, but I'm sure you can figure out what you need to change.
The CSS file:
body
background-color:#E2E5B4;
font-family:Liberation Sans, DejaVu Sans, Verdana, Arial, sans-serif;
font-size:13px;
color:#474750;
padding:0px 0px 10px 0px;
margin:0px;
div#header
border-bottom:3px solid #C8A654;
padding:16px;
background-color:#313D40;
div#header h1
display:inline;
font-size:7em;
color:#74B331 ;
div#header table
position:relative;
right:64px;
margin:0px 16px 0px 16px;
float:right;
color:#93FF20;
border:1px solid #;
div#header table td
padding:3px;
div#header table td.head
width:200px;
font-weight:bold;
ul#tabs
list-style:none;
position:relative;
top:-3px;
padding:0px;
margin:0px;
ul#tabs li {
float:left;
margin:0px 16px 0px 16px;
width:100px;
border-left:3px solid #C8A654;
border-right:3px solid #C8A654;
border-bottom:3px solid #C8A654;
background-color:#313D40;
text-align:center;
ul#tabs li a
color:#FF3709;
font-weight:bold;
font-size:10px;
text-decoration:none;
ul#tabs li a:hover
font-weight:normal;
div#content
clear:both;
padding:24px 128px 0px 128px;
margin:0px;
div#content table
border-spacing:0px;
border:3px solid #C8A654;
color:#FDFED2;
width:100%;
div#content td.head
font-weight:bold;
width:95%;
div#content tr td
background-color:#3E4147;
padding:10px;
div#content tr.odd td
background-color:#27333A;
div#content span.summary
font-weight:normal;
font-size:10px;
div#content td.good
color:#A4D933;
div#content td.bad
color:#FF3709;
Note: in the services and utilities array it's not the name of the daemon, but the name of the file it creates in /var/run/daemons/.
Note 2: The /usr/local/bin/updates is just a script to grab the number of updates from pacman.
Last edited by Barrucadu (2009-07-26 14:54:28)

I like it!
I'll give this a crack when I get home tonight.

Similar Messages

  • Need a bat script to check Server status remotly.

    Hi,
    I need bat script to check server status remotly (Ping) for multiple servers. It should generate a txt file for result.
    Thanks.

    Hi Ravi,
    To ping multiple computers and generate report cia cmd, please refer to the script below, the "fnm" is computer name list and the "lnm" is the result, and you can save the script below as .bat file:
    @echo off
    set fnm=d:\test1\computers.txt
    set lnm=d:\test1\ping.txt
    if exist %fnm% goto Label1
    echo.
    echo Cannot find %fnm%
    echo.
    Pause
    goto :eof
    :Label1
    echo PingTest STARTED on %date% at %time% > %lnm%
    echo ================================================= >> %lnm%
    echo.
    for /f %%i in (%fnm%) do call :Sub %%i
    echo.
    echo ================================================= >> %lnm%
    echo PingTest ENDED on %date% at %time% >> %lnm%
    echo ... now exiting
    goto :eof
    :Sub
    echo Testing %1
    set state=alive
    ping -n 1 %1
    if errorlevel 1 set state=dead
    echo %1 is %state% >> %lnm%
    Refer to:
    Explain the Batch script to ping multiple computers
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Weblogic.admin script to alert server status

    Hi,
    Can anybody share a weblogic.admin utility script for alerting the server status in unix ?

    Below is the solaris shell script integrated with weblogic.admin utility....
    If the server status is other than running it will sends a alert mail to you.
    Sometime your server may be in shutdown mode and if you execute the below script, it says destination not reachable on specified port and then also it sends a alert mail.
    Change it according to ur env and execute...
    set -x
    export CLASSPATH=”/wl_home/server/lib/weblogic.jar”
    declare -a Port=( 8003 7072 8201 )
    declare -a ServerState[]
    declare -a ServerName[]
    declare -a ObjectName[]
    i=”0″
    IP=Weblogic host address
    while [ $i -lt 5 ]
    do
    ServerState[$i]=`java weblogic.Admin -url $IP:${Port[$i]} -username weblogic -password weblogic GET -pretty -type ServerRuntime -property State |grep -i State |awk ‘{print $2}’`
    ObjectName[$i]=`java weblogic.Admin -url $IP:${Port[$i]} -username weblogic -password password GET -pretty -type JVMRuntime -property ObjectName |grep -i ObjectName |awk ‘{print $2}’`
    if [ "${ServerState[$i]}” != “RUNNING” ] ;
    then
    mailx -s ” Weblogic Server Staus- $IP ” [email protected]<<EOF
    Weblogic Managed server ${Port[$i]} is in SHUTDOWN state
    EOF
    fi
    i=`expr $i + 1`
    done
    Thanks,
    Kartheek
    Troubleshooting in weblogic gives thrilling experience .......

  • Script for Checking the Server Status

    Hi All,
         I just need the script for monitoring the server status through the WLST.My scenario:I have 2 server in Running State.If any one of the server get failed or in not RUNNING state then i use the script for starting that server automatically.I tried some of the script but it is not working properly .If any one have the sample script please share with me.
    Regards,
    Ove.

    Hi Syed,
    Replication state is very easy to see in 4.x and earlier. The last changenumber in the supplier changelog is visible (on the root DSE IIRC), and each consumer suffix has an operational attribute "copiedfrom" that tells you the name of the supplier, the database generation id, and the last change replayed from the supplier.
    So a script that compares the results of
    ldapsearch -h <supplier> -s base -b "" "objectclass=*" lastchangenumber
    and
    ldapsearch -h <consumer> -s base -b <base_suffix> "objectclass=*" copiedFrom
    will show you if a replica has fallen out of sync. It won't tell you more than how many changes behind the replica is, though, because pre-5.x changenumbers are sequential integers, not timestamps.
    However, the change that corresponds to the changenumber is clearly visible under the "cn=changelog" suffix. So if you look at the change itself you can see the timestamp on it.
    For more info on the status of replication, you should be able to query the agreements on the supplier. Those live under the "Netscape Machine Data Suffix", which you can also find on the supplier's root DSE:
    ldapsearch -h <supplier> -s base -b "" "objectclass=*" netscapemdsuffix
    And of course the error logs will usually tell you if replication is failing outright.
    I may be off on some of the attribute names, but if you do some investigating along these lines, you should be able to figure it out.

  • Live view test server won't execute php scripts

    Hello everyone!
    I've had a web developer design a site for me based on php.
    Rather than bother them for simple image changes and content
    updates, I'm trying to learn to do those things myself. I'm very
    new to Dreamweaver and I'm having difficulties getting php script
    to execute through my test server. I have the latest versions of
    Dreamweaver, MySQL, php, and Apache installed on my machine. I've
    downloaded the source files off of my hosting server. The problem
    is when I try to "Live View" the "index.php" off of the root file
    on the test server, Dreamweaver gives me an error that says:
    "The testing server did not execute any of the scripts in
    your document. Possible explanations include:
    1.> The test server is not running
    2.> The test server ignores files with .php. in the
    extension
    3.> The documents did not contain any scripts."
    I know my system is working properly because I created a page
    "timetest.php" with the following code:
    <p>This page was created at <b><?php echo
    date("h:i:s a", time()); ?></b> on the computer running
    PHP.</p>
    ...and it works fine in "Live View".
    Any ideas what the problem might be? I've been reading books
    and searching online and I haven't been able to figure it out.
    Here's what the code on "index.php" looks like:

    What happens when you view your page on your test server in a
    browser?
    Are the php scripts executed?
    Also, the macromedia.dreamweaver.appdev forum is a more
    appropriate
    place for this question, so you might get a better response.
    Randy
    > "The testing server did not execute any of the scripts
    in your document.

  • Creating a file on server, using Flash AS3 + PHP

    I have a very simple PHP script that creates a new file on my server using a random number for the file name (e.g., 412561.txt).  When I load the script directly from a browser, it works.  But when I load the script from a very simple Flash (AS3) script, it does not work (i.e., doesn't create a file).  The Flash script and PHP script are both in the same directory.  Permissions on the directory and its content are 755.  Temporarily setting those permissions to 777 does not solve the problem (i.e., PHP still doesn't create file when called via Flash).
    Here is my phpinfo.
    Here is the PHP file.
    The contents of the PHP file are:
    <?php
    error_reporting(E_ALL);
    ini_set("display_errors", 1);
    $RandomNumber = rand(1,1000000);
    $filename = "$RandomNumber" . ".txt";
    $filecontent = "This is the content of the file.";
    if(file_exists($filename))
              {$myTextFileHandler = fopen($filename,"r+"); }
    else
              {$myTextFileHandler = fopen($filename,"w"); }
    if($myTextFileHandler)
              {$writeInTxtFile = @fwrite($myTextFileHandler,"$filecontent");}     
    fclose($myTextFileHandler);   
    ?>
    Here is the html container for the Flash script.  The Flash script features a single button which calls the PHP script when pressed.  In case it helps, here is the raw Flash file itself.  The code of the Flash script is as follows:
    stop();
    var varLoader:URLLoader = new URLLoader;
    var varURL:URLRequest = new URLRequest("http://www.jasonfinley.com/research/testing/TestingSaveData.php");
    btnSave.addEventListener(MouseEvent.CLICK,fxnSave);
    function fxnSave(event:MouseEvent):void{
              btnSave.enabled=false;
              varLoader.load(varURL);
    Directory listing is enabled at the parent directory here, so you can see there when a new text file is created or not.  (Um, if this is a security disaster, please let me know!)
    Can anyone please help me understand why this isn't working and how I can fix it?  Thank you
    ~jason

    #1, Yes that is a security risk, please disable directory index viewing.
    #2, Always validate. I see no issue with the code you're using but clearly it's not working. The way you find out is your trusty errors.
    Make a new document (or paste this into your existing) where a button with the instance name btnSave is on screen:
    // import required libs
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.events.IOErrorEvent;
    import flash.events.MouseEvent;
    import flash.events.SecurityErrorEvent;
    import flash.text.TextField;
    // assign handler
    btnSave.addEventListener(MouseEvent.CLICK, fxnSave);
    // make a textfield to display status
    var tf:TextField = new TextField();
    addChild(tf);
    tf.width = stage.stageWidth;
    tf.height = 300;
    tf.multiline = true;
    tf.wordWrap = true;
    tf.selectable = false;
    tf.text = "Loading...\n";
    // just making sure the textfield is below the button
    this.swapChildren(tf,btnSave);
    function fxnSave(event:MouseEvent):void
        // disable button
        event.currentTarget.enabled = false;
        // new loader
        var varLoader:URLLoader = new URLLoader();
        // listen for load success
        varLoader.addEventListener(Event.COMPLETE, _onCompleteHandler);
        // listen for general errors
        varLoader.addEventListener(IOErrorEvent.IO_ERROR, _onErrorHandler);
        // listen for security / cross-domain errors
        varLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, _onErrorHandler);
        // perform load
        varLoader.load(new URLRequest("http://www.jasonfinley.com/research/testing/TestingSaveData.php"));
    // complete handler
    function _onCompleteHandler(e:Event):void
        tf.appendText("Load complete: " + e);
    // error handler
    function _onErrorHandler(e:Event)
        if (e.type == SecurityErrorEvent.SECURITY_ERROR)
            tf.appendText("Load failed, Security error: " + e + " type[" + e.type + "]");
        else if (e.type == IOErrorEvent.IO_ERROR)
            tf.appendText("Load failed, IO error: " + e + " type[" + e.type + "]");
    I get a Event.COMPLETE for mine, so the PHP script is definitely firing. Change the URL to something invalid and you'll see the IOErrorEvent fire off right away.
    That leaves you to diagnose the PHP script. Check your error_log and see what is going wrong. You're suppressing errors on your file write which doesn't help you locate the issue saving the file. If you want to handle errors yourself you should do the usual try/catch and handle the error yourself (write a debug log file, anything).

  • Pointers re bash status script

    To try and come to grips with bash scripting, I have been working on a basic status script for my laptop. What I have at the moment has all the functionality that I need and, more importantly, it works.
    However, as it runs in a loop and as you never know what you don't know, I would really appreciate any comments about the approach I have used.
    Please don't rewrite the script, just point out things I might want to look at to make it more efficient and/or more elegant/correct. Apart from Procyon's line, most of it is stuff I have cobbled together. The $BAT stuff seems particularly kludgy...
    Brutal criticism is welcome, as long as it is constructive
    # edit - so much for extensive testing. Moved the $CHG line into the loop where it could actually update
    #!/bin/bash
    # Status script for wmfs
    RED="\\#BF4D80\\"
    YEL="\\#C4A1E6\\"
    BLU="\\#477AB3\\"
    GRN="\\#53A6A6\\"
    CYN="\\#6096BF\\"
    MAG="\\#7E62B3\\"
    GRY="\\#666666\\"
    WHT="\\#C0C0C0\\"
    while true;
    do
    # Collect system information
    CHG=`acpi -V | awk '{ gsub(/,/, "");} NR==1 {print $4}'`
    BAT=`acpi -V | if grep -q "on-line"; then echo $BLU"AC"; else echo $RED$CHG; fi`
    MEM=`free -m | awk '/Mem/ {print $3}'`
    # CPU line courtesy Procyon: https://bbs.archlinux.org/viewtopic.php?pid=661592
    CPU=`eval $(awk '/^cpu /{print "previdle=" $5 "; prevtotal=" $2+$3+$4+$5 }' /proc/stat); sleep 0.4;
    eval $(awk '/^cpu /{print "idle=" $5 "; total=" $2+$3+$4+$5 }' /proc/stat);
    intervaltotal=$((total-${prevtotal:-0}));
    echo "$((100*( (intervaltotal) - ($idle-${previdle:-0}) ) / (intervaltotal) ))"`
    HD=`df -h | awk '/^ |sd/ {if (NF==5) print $4; else if (NF==6) print $5}'`
    PCM=`exec "/home/jason/Scripts/pacman-up.pl"`
    INT=`host google.com>/dev/null; if [ $? -eq 0 ]; then echo $GRN"ON"; else echo $RED"NO"; fi`
    DATE=`date "+%I:%M"`
    # Pipe to status bar
    wmfs -s 0 "$GRY[BAT $BAT$GRY] [CPU $YEL$CPU%$GRY MEM $CYN$MEM$GRY] [HDD $MAG$HD$GRY] [PAC $BLU$PCM$GRY] [NET $INT$GRY] • $WHT$DATE"
    sleep 5
    done
    Last edited by jasonwryan (2010-12-28 06:52:25)

    Thanks rockin turtle. I tried your suggestion, but couldn't get it to play nicely with the rest of the
    script. So I am using Procyon's. I'm not sure what is wrong with eval, but I will live with it for the time being.
    I have made quite a few changes based on everyone's input. Thank you all.
    The finished product? At least for now:
    #!/bin/bash
    # Status script for wmfs
    RED="\\#BF4D80\\"
    YEL="\\#C4A1E6\\"
    BLU="\\#477AB3\\"
    GRN="\\#53A6A6\\"
    CYN="\\#6096BF\\"
    MAG="\\#7E62B3\\"
    GRY="\\#666666\\"
    WHT="\\#C0C0C0\\"
    # Collect system information
    CHG=$(acpi -V | awk '{ gsub(/,/, "");} NR==1 {print $4}')
    BAT=$(grep -q "on-line" <(acpi -V) && echo $BLU"AC" || echo $RED$CHG)
    MEM=$(awk '/Mem/ {print $3}' <(free -m))
    # CPU line courtesy Procyon: https://bbs.archlinux.org/viewtopic.php?pid=661592
    CPU=$(eval $(awk '/^cpu /{print "previdle=" $5 "; prevtotal=" $2+$3+$4+$5 }' /proc/stat); sleep 0.4;
    eval $(awk '/^cpu /{print "idle=" $5 "; total=" $2+$3+$4+$5 }' /proc/stat);
    intervaltotal=$((total-${prevtotal:-0}));
    echo "$((100*( (intervaltotal) - ($idle-${previdle:-0}) ) / (intervaltotal) ))")
    HD=$(awk '/^\/dev/{print $5}' <(df -P))
    PCM=$("$HOME/Scripts/pacman-up.pl")
    INT=$(host google.com>/dev/null && echo $GRN"ON" || echo $RED"NO")
    DTE=$(date "+%I:%M")
    # Pipe to status bar
    wmfs -s "$GRY[BAT $BAT$GRY] [CPU $YEL$CPU%$GRY MEM $CYN$MEM$GRY] [HDD $MAG$HD$GRY] [PAC $BLU$PCM$GRY] [NET $INT$GRY] • $WHT$DTE"

  • Printing glitches on my archlinux server

    Hello archers,
    i've been having some problems with my archlinux server. Connected to the server is a HP Laserjet CM1312 printer via USB, server is shared via CUPS and Samba.
    I've followed the Archwiki guide for CUPS and Samba for installing the printer.
    The specific problem i'm having is printing from a Windows machine. After printing has begun, printing is first fine, but then it'll sometimes start to print gibberish like this (with PCL5): http://ompldr.org/vNzd2aw
    I've yet to experience problems printing from my linux machine. I've tried shifting in between drivers on the Windows machine (PCL5, PCL6, Postscript)
    Switching to a Postscript driver on the Windows machine prints fine, but after a while produces errors like this: http://ompldr.org/vNzd2dw
    CUPS error log contains:
    E [30/Jan/2011:21:03:05 +0100] [cups-driverd] Bad driver information file "/usr/share/cups/model/foomatic-db-ppds/Kyocera/ReadMe.htm"!
    E [30/Jan/2011:21:04:00 +0100] [cups-driverd] Bad driver information file "/usr/share/cups/model/foomatic-db-ppds/Kyocera/ReadMe.htm"!
    D [30/Jan/2011:21:06:20 +0100] [Job 51] The following messages were recorded from 21:00:03 to 21:06:20
    D [30/Jan/2011:21:06:20 +0100] [Job 51] Adding start banner page "none".
    D [30/Jan/2011:21:06:20 +0100] [Job 51] Adding end banner page "none".
    D [30/Jan/2011:21:06:20 +0100] [Job 51] File of type application/vnd.cups-raw queued by "nobody".
    D [30/Jan/2011:21:06:20 +0100] [Job 51] hold_until=0
    D [30/Jan/2011:21:06:20 +0100] [Job 51] Queued on "HP_Color_LaserJet_CM1312_MFP_USB_00CNF8B3Q1SC_HPLIP" by "nobody".
    D [30/Jan/2011:21:06:20 +0100] [Job 51] job-sheets=none,none
    D [30/Jan/2011:21:06:20 +0100] [Job 51] argv[0]="HP_Color_LaserJet_CM1312_MFP_USB_00CNF8B3Q1SC_HPLIP"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] argv[1]="51"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] argv[2]="nobody"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] argv[3]="smbprn.00000039 Remote Downlevel Document"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] argv[4]="1"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] argv[5]="job-originating-host-name=::ffff:192.168.1.133 job-uuid=urn:uuid:6345dae1-010f-3774-55f6-7cb213dff752 time-at-creation=1296417603 time-at-processing=1296417976 AP_D_InputSlot="
    D [30/Jan/2011:21:06:20 +0100] [Job 51] argv[6]="/var/spool/cups/d00051-001"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[1]="CUPS_DATADIR=/usr/share/cups"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[2]="CUPS_DOCROOT=/usr/share/cups/doc"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[6]="CUPS_SERVERROOT=/etc/cups"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[7]="CUPS_STATEDIR=/var/run/cups"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[8]="HOME=/var/spool/cups/tmp"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[10]="[email protected]"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[11]="SOFTWARE=CUPS/1.4.6"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[12]="TMPDIR=/var/spool/cups/tmp"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[13]="USER=root"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[14]="CUPS_SERVER=/var/run/cups/cups.sock"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[15]="CUPS_ENCRYPTION=IfRequested"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[16]="IPP_PORT=631"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[17]="CHARSET=utf-8"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[18]="LANG=en_US.UTF-8"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[19]="PPD=/etc/cups/ppd/HP_Color_LaserJet_CM1312_MFP_USB_00CNF8B3Q1SC_HPLIP.ppd"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[20]="RIP_MAX_CACHE=8m"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[21]="CONTENT_TYPE=application/vnd.cups-raw"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[22]="DEVICE_URI=hp:/usb/HP_Color_LaserJet_CM1312_MFP?serial=00CNF8B3Q1SC"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[23]="PRINTER_INFO=HP Color LaserJet CM1312 MFP"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[24]="PRINTER_LOCATION=Local Printer"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[25]="PRINTER=HP_Color_LaserJet_CM1312_MFP_USB_00CNF8B3Q1SC_HPLIP"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] envp[26]="CUPS_FILETYPE=document"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] Started backend /usr/lib/cups/backend/hp (PID 22315)
    D [30/Jan/2011:21:06:20 +0100] [Job 51] PAGE: 1 1
    D [30/Jan/2011:21:06:20 +0100] [Job 51] STATE: +connecting-to-device
    D [30/Jan/2011:21:06:20 +0100] [Job 51] STATE: -connecting-to-device
    D [30/Jan/2011:21:06:20 +0100] [Job 51] STATE: -media-empty-error,media-jam-error,hplip.plugin-error,cover-open-error,toner-empty-error,other
    D [30/Jan/2011:21:06:20 +0100] [Job 51] prnt/backend/hp.c 625: ERROR: 5021 device communication error!
    D [30/Jan/2011:21:06:20 +0100] [Job 51] Backend returned status 4 (stop printer)
    D [30/Jan/2011:21:06:20 +0100] [Job 51] Printer stopped due to backend errors; please consult the error_log file for details.
    D [30/Jan/2011:21:06:20 +0100] [Job 51] End of messages
    D [30/Jan/2011:21:06:20 +0100] [Job 51] printer-state=5(stopped)
    D [30/Jan/2011:21:06:20 +0100] [Job 51] printer-state-message="/usr/lib/cups/backend/hp failed"
    D [30/Jan/2011:21:06:20 +0100] [Job 51] printer-state-reasons=paused
    E [30/Jan/2011:21:11:22 +0100] [Job 51] Stopping unresponsive job!
    Hope you can help me out.

    timm wrote:it now requires a microsoft sql server.
    You may try using Sybase ASE; for long time (until 6.0), MS SQL Server was just Sybase with MS branding and even today differences are not so big (depending, of course, on specific application's needs). I have never tried such a setup, but connecting to MSSQL with Sybase client libraries works OK, maybe you'd have luck in opposite direction.
    There is a document on migrating apps from MSSQL to ASE; I know this is not the case, but there are some valuable information about differences between those RDBMSs that may help you to decide whether there are chances to succeed or not.

  • Help with web form script. PHP, CGI, Perl???

    anyone willing to help with a web form script? I have a form built, but cant seem to figure out the scripting! Should I be using Perl, CGI, PHP... What do I need to enable? I am a complete novice when it comes to scripts. Looking for a little friendly help.

    Here is a simple bit of PHP to stick in the page your form posts to. You would need to edit the first three variables to your liking, and add the html you want to serve afterwards:
    <pre>
    <?php
    $emailFrom = '[email protected]';
    $emailTo = '[email protected]';
    $emailSubject = 'Subject';
    $date = date('l, \t\h\e dS \o\f F, Y \a\t g:i A');
    $browser = $HTTPSERVER_VARS['HTTP_USERAGENT'];
    $hostname = $HTTPSERVER_VARS['REMOTEADDR'];
    $message = "$date\n\nAddress: $hostname\nBrowser: $browser\n\n";
    foreach ($_POST as $key => $value) {
    $message .= $key . ": " . $value . "\n";
    $mailResult = mail($emailTo,$emailSubject,$message,"From: $emailFrom");
    ?>
    </pre>
    This script will grab the server's date and the submitter's address and browser type. It will then list the name and value of each form field you have put on your form.
    Also, this script expects your form method="post".
    Lastly, you can offer alternate text later on in your html page based on the success of the above script with a snippet like this:
    <pre><?php
    if ($mailResult) {
    echo "Your comments have been received thank you.";
    } else {
    echo "There was an error. Please try again or contact us using an alternate method.";
    ?></pre>

  • SOA server status

    I am new in SOA 11g.
    I run scripts:
    startWebLogic.cmd
    startManagedWebLogic.cmd soa_server1
    startManagedWebLogic.cmd bam_server1
    Then, I login to the EM.
    Under the Resource Adapters in the left, the oracle-bam(11.1.1) and soa-infra are down.
    Under the BAM, OracleBamServer (bam_server1) is down.
    Others are up.
    Are these server status correct?
    How to change the the status of these servers from down to up?

    Are you able to access SOA Infra/BAM page?
    If not, check your server logs for any exceptions/errors.
    If there are no errors, try starting your servers from EM (You need to run node manager for this operation).

  • Segmentation fault calling an oracle db status script

    HI,
    I have a problem on a OEL 5 cluster with an Oracle 10.2.0.3 in active/passive environment (not RAC).
    When the Oracle Cluster service script checks the status of the service sometimes I have segmentation fault error.
    The script is:
    #!/bin/sh
    # Cluster service script to start, stop, and check status of oracle
    set -xv
    case $1 in
    start)
    su - oracle -c /home/oracle/startdb.sh
    RetVal=$?
    stop)
    su - oracle -c /home/oracle/stopdb.sh
    RetVal=$?
    status)
    su - oracle -c /home/oracle/statusdb.sh
    RetVal=$?
    esac
    set +xv
    exit $RetVal
    The error log of the executing the "status" part of the script is:
    + case $1 in
    + su - oracle -c /home/oracle/statusdb.sh
    /usr/local/sbin/oraclust.sh: line 16: 6779 Segmentation fault su - oracle -c /home/oracle/statusdb.sh
    + RetVal=139
    This script is executed every 30 seconds but I have the error once every 10 hours.
    What could it be?
    Many thanks.

    hi,
    here is the script /home/oracle/statusdb.sh:
    #!/bin/sh
    # Script to CHECK the Oracle Database Server Status.
    ORACLE_RELEASE=10.2.0
    export ORACLE_SID=mysid
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/${ORACLE_RELEASE}/db_1
    export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:$LD_LIBRARY_PATH
    export PATH=$PATH:${ORACLE_HOME}/bin
    ${ORACLE_HOME}/bin/sqlplus / as sysdba << EOF
    whenever sqlerror exit sql.sqlcode;
    whenever oserror exit failure;
    set pagesize 0;
    set feedback off;
    set wrap off;
    set heading off;
    UPDATE clustmon.clst_chk_tbl SET status = 'ok';
    commit;
    quit;
    EOF
    exit $?
    thanks.

  • Server status shown as 'Not Configured' in single server farm.

    In a single server farm, after installation and running the configuration wizard for multiple times, the status of server is shown as 'Not Configured'. There is no abnormality in any other features (so far), everything functions fine, but we see the 'Not
    configured' message in 'Servers in Farm' and 'Manage Patch Status'. We have used  the same AutoSPInstaller script to install Sharepoint on two machines SPDev1 and SPDev2. This error does not show up on SPDev1 but on SPDev2. Is this something to worry
    about ?

    Hi ,
    According to your description, my understanding is that the server status showed “Not Configured” in single server farm.
    Please run SharePoint 2013 Products Configuration Wizards to remove the server from the farm via clicking “Disconnect the existing farm”. After finishing, re-run configuration wizards to connect the existing farm.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Writing Server Repost Script to post data to Eloqua

    Hello!
    Newbie here.
    Been trying to follow tutorials on form repost and found one article:
    Eloqua Artisan: Using Form Reposts for Advanced Form Integration
    Currently I'm stuck on step#5.
    Can anyone enlighten me on writing a server repost script to post data to Eloqua.
    A sample script will be very much appreciated.
    Thanks in advanced!

    Hey Theresa,
    I can help you out with that. Can you tell me what languages are supported on the server you're trying to re-post from (e.g. PHP, Ruby, ASP, etc.)?
    Thanks,
    Ilya Hoffman
    Synapse Automation

  • ArchLinux server

    Hi all,
    I like archlinux very much, and since i installed it on my desktop computer, i don't need any other distro... But now i wonder how good archlinux is for server? Maybe there are some test or smth where i can compare arch with other OSes. Is it stabile? Maybe there are people who can share their experiences about archlinux server. I would be thankful for your neutral opinion. (for example in lithuania most popular servers distributions is Debian and RedHat. Can archlinux compete with these distros?)

    Most depens on what are you looking for, but generally speaking..........
    I use it as server, both web and office.
    At web level I think nothing is missing, o better, all the most important and secondary stuff is avail. By having all latest versions it is surely competitive against other distro.
    At  office server level it is a bit different.
    If you are looking for a simple intranet server it is ok.
    If you are looking for a integrated atuth system, file sharing ant other  local network service there are a lot of work to do.
    You have
    cups for printing services
    nfs/samba for file sharing
    http,squid,  etc. etc. intranet web service
    No auth system centralized on the server actually, o better there is NIS but it is the most insecure auth system avail today.
    Actually I am working on making LDAP auth working under Archlinux, I still have work to do but no time 
    LDAP is there but the pam module are missing, actually I compiled them but I didn't had time to configure server and client and make tests

  • FPGA compiler Server status says idle but Status says compiling VHDL

    when i compile my FGPA vi file , after some time in the compile server window "Server status" shows "idle.." but the status box shows "Compiling VHDL".
    It stays in this condition for a long time about 30 mins. Why is this happening? I am also attaching the screenshot of the compile server.
    FPGA vi i am trying to compile is the Sine Generator.vi which was there in examples under FPGA Fundamanetals->Analysis and Controls.
    Attachments:
    compile server.JPG ‏59 KB

    I am attaching the block diagram of the fpga vi. It is a sine generator example which was in the labview examples folder.
    I am seeign this behaviour only when i compile this fpga vi. I have compiled other fpga vi's without any problem.
    Attachments:
    fpga vi for sine genrator.JPG ‏127 KB

Maybe you are looking for

  • Apps corner is not working

    In my Lumia 730 the apps corner not working , I can't launch the selected apps in apps corner. How can i fix the problem ? Solved! Go to Solution.

  • Half notes show up as eighth notes when viewed as score

    I'm on Garageband 09, and when I make a half note next to a string of eighth notes, the half note appears as an eighth note. It also appears as a quarter note when by itself sometimes. When I click on the note, a green bar shows how long the note is

  • OEM12c Configuring alerts for normal condition

    Hi All, I want to configure OEM12c so that i should get alerts even for normal condition of the host machines. i.e i want OEM to send alerts saying target system is alive and working properly. please let me know how to do it or point me to the docume

  • Is possible to make the bookmarks bar only appear on the homepage?

    I was just wondering if it was possible, with or without an add-on, if i could make it so that the bookmarks bar only appears on the homepage.

  • Parent WPF Client Window not on top after closing a screen set

    Hi all, I am observing some strange behavior with the WPF Client (SMP 2.3 SP 4). When closing a screen set (window), sometimes the parent window is in the background (meaning some other windows programs are on top of them) even if the parent window w