Jump to content

Search the Community

Showing results for tags 'unix'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 3 results

  1. GREETING: I would like to wish everyone at W3Schools a very Happy New Year! BACKGROUND: In an effort to speed up Matomo's performance without having to create a routine that will retrieve, save, and call the desire data -- a procedure suggested earlier by others -- I am seeking to set up a Matomo CRON job that apparently does the same with no additional coding on my part. Unfortunately, I am confused by the syntax. CODE (RECOMMENDED BY MATOMO): 5 * * * * www-data /usr/bin/php5 /path/to/piwik/console core:archive --url=http://example.org/piwik/ > /home/example/piwik-archive.log QUESTION: To what refers the phrase core:archive in the above code segment? NOTE: Within the path/to/piwik folder there exists a document file called console. Within the path/to/piwik/core folder there exists a file called Console.php, a folder called Archive, and a file called Archive.php. There are various files in the Archive folder, but none of them resemble very closely any of the folders and files just mentioned. Roddy
  2. Hi I am using below script to create 3 tables adjacent to each other : PARAMETERS MOUNT SIZE 1 f fg fgh BEFORE_USAGE USED AVAILABLE USE% 1 f 5 fg fgh t2 AFTER_USAGE USED AVAILABLE USE% Fvfev kjhkj kjgfhkg fbghvg gcfv hfjghj QUERY : I want to use df -h command which should fill the data ( <td> ) in the above 3 table columns ( Parameters/ Before_Usgae/After_Usage). BEFORE USAGE : The disk space before clearing the space on the server. AFTER USAGE : Disk space after clearing the space. The problem here is : I am able to write the code in linux to generate the table like above ( next to each other) but unable to generate the data for ( Mount/size) , ( Used/available/use%) in runtime. Please help me how can i achieve this. ------------------------- #! /bin/bash MailTO=xyz@gmail.com DATE=`/bin/date '+%Y%m%d-%H%M%S'` HOST=`hostname` ALERT_DIR_COUNT=`df -Ph | grep -v "Use%" | sed 's/%//g' | awk '$5 > 70 {print $1,$2,$3,$4,$5"%",$6;}' | column -t | wc -l` ( printf "To: xyz@gmail.com\n" printf "Subject:$HOST\n :$ALERT_DIR_COUNT\n mounts reached threshold & Logs Cleared : $Numberofdays days\n" printf "Content-Type: text/html\n" printf "<html>\n" printf "<body>\n" df -Ph | awk ' BEGIN { printf "<table border="1" cellspacing="0" cellpadding="0">" printf "<tr>" printf "<td width="40">" printf "<table width="100" border="1" cellspacing="0" cellpadding="1">" printf "<tr>" printf "<th style=\"font-size:12px\" bgcolor=#B2BABB align=center colspan="2">PARAMETERS</th>" printf "<tr>" printf "<th style=\"font-size:12px\" bgcolor=#EAEDED>MOUNT</th>" printf "<th style=\"font-size:12px\" bgcolor=#EAEDED>SIZE</th>" printf "</tr>" printf "<tr>" printf "<td>1</td>" printf "<td>f</td>" printf "</tr>" printf "<tr>" printf "<td>fg</td>" printf "<td>fgh</td>" printf "</tr>" printf "</table>" printf "</td>" printf "<td width="30">" printf "<table width="100" border="1" cellspacing="0" cellpadding="1">" printf "<tr>" printf "<th style=\"font-size:12px\"bgcolor=#73C6B6 align=center colspan="3">BEFORE_USAGE</th>" printf "<tr>" printf "<th style=\"font-size:12px\" bgcolor=#D0ECE7>USED</th>" printf "<th style=\"font-size:12px\" bgcolor=#D0ECE7>AVAILABLE</th>" printf "<th style=\"font-size:12px\" bgcolor=#D0ECE7>USE%</th>" printf "</tr>" printf "<tr>" printf "<td>1</td>" printf "<td>f</td>" printf "<td>5</td>" printf "</tr>" printf "<tr>" printf "<td>fg</td>" printf "<td>fgh</td>" printf "<td>t2</td>" printf "</tr>" printf "</table>" printf "</td>" printf "<td width="30">" printf "<table width="100" border="1" cellspacing="0" cellpadding="1">" printf "<tr>" printf "<th style=\"font-size:12px\" bgcolor=#7FB3D5 align=center colspan="3">AFTER_USAGE</th>" printf "<tr>" printf "<th style=\"font-size:12px\" bgcolor=#D6EAF8>USED</th>" printf "<th style=\"font-size:12px\" bgcolor=#D6EAF8>AVAILABLE</th>" printf "<th style=\"font-size:12px\" bgcolor=#D6EAF8>USE%</th>" printf "</tr>" printf "<tr>" printf "<td>Fvfev</td>" printf "<td>kjhkj</td>" printf "<td>kjgfhkg</td>" printf "</tr>" printf "<tr>" printf "<td>fbghvg</td>" printf "<td>gcfv</td>" printf "<td>hfjghj</td>" printf "</tr>" printf "</table>" printf "</td>" printf "</tr>" printf "</table>" } END { print "</table>" }' printf "</body>\n</html>\n" ) | /usr/sbin/sendmail $MailTO
  3. Hi I have a column in my database which is called "lastupdated" it stores a unix date and time stamp '1331299541' Fri, 09 Mar 2012 13:25:41 GMT. I want to run a query to retrieve any activity that happens that day. $query = "SELECT * FROM contacts WHERE lastupdated = '1331299541'"; As you can see i'm quite new to this so looking to be pointed in the right direction. I know its to do with formatting the date stamp? Cheers Chris
×
×
  • Create New...