Server :: A Script To Shutdown A Service When A Sybase Table Reads Over A Certain Count?

Aug 3, 2009

Someone at work has requested if i can find out anything on the above.Been googling around as well as i have only been using Linux for 2 months now.

basically there is a SYBASE ASE installation on the server, which a tomcat based website references.They want the service to stop once a certain row limit is reached in the table.

I know i have to do a count statement on the sybase table from ISQL.But how can i create the action "service website stop" once the count value reaches 4000 ?

View 2 Replies


ADVERTISEMENT

Programming :: Shell Script To Get Count Of Records In A Mysql Table?

Oct 23, 2010

I'm using MYTHTV with AT&T's U-Verse system. AT&T apparently turns off the set-top box if the box doesn't receive any commands after some number of hours. When this happens the box takes so long to turn on that it doesn't process the lirc IR channel change command. I've rewritten my channel changer to add a lockfile, and added a cron entry to kick off an entry to just "ping" the set-top box once an hour. But, OK, I'd like to play the bandwidth saving game and not do this if there isn't anything in the "record" table.

So, how would I write a script that will check the number of rows in the "record" table in the "mythconverg" database and exit if there are zero rows? I'm afraid I don't know how to even start this. Here is my "keepalive.sh" script that does the pinging:

Code:
#!/bin/sh
#if there are no rows in the record table, just exit this script
# lock the lockfile - MUST be same one as channel lock
while [ `lockfile "/tmp/mythchanlock.lck"` ]

[Code]....

View 3 Replies View Related

General :: Difference Between Buffered Disk Reads And Cached Reads?

Jul 13, 2011

I was analyzing the Disk read using hdparm utility. This is what i got as a result.

Code:

# hdparm -t /dev/sda

/dev/sda:

Timing buffered disk reads: 108 MB in 3.04 seconds = 35.51 MB/sec

Code:

# hdparm -T /dev/sda

/dev/sda:

Timing cached reads: 3496 MB in 1.99 seconds = 1756.56 MB/sec I m not sure what does Cache read and buffered disk read mean.

View 1 Replies View Related

Software :: Connecting To Sybase Server?

Aug 12, 2010

I need to reconfigure my php to have Sybase support. However, I am not sure which library to use. I'll try freetds but I am not sure if it will work. I used it before with Microsoft MSSQL.

View 3 Replies View Related

Software :: Get Freetds And Sybase Up And Running On Centos Server?

Mar 9, 2010

I'm attempting to get freetds and sybase up and running on my centos server, mainly for nagios - MSSQL checks. I've installed freetds freetds-devel ok but am having issues getting SYBASE installed. I've had a go via cpan but get a failure on the sybase environment variable. I've set it to /etc where the conf file is located as well as trying /urr/lib64 for the tds libs, but no joy. Has anyone had much luck with this on centos?

export SYBASE=/etc
[root@nagios ~]# echo $SYBASE
/etc
cpan DBD::Sybase
CPAN: Storable loaded ok (v2.15)

[Code]...

View 3 Replies View Related

CentOS 5 :: Shutdown/service - Command Not Found

Aug 13, 2009

With this issue:

$ sudo shutdown -r now

sudo: shutdown: command not found

View 2 Replies View Related

General :: Make Shutdown Wait Until Service Is Stopped?

May 6, 2011

I have a third party application with a database.

I have created the service but it does not wait for the database to shutdown before the systems continues with the shutdown.

This results in the database being seen as crashed.

here is my stuff i did.

CACHE START AND STOP SCRIPT FOR REDHAT

#vi /home/cacheusr/cache_ctrl
Insert below
#!/bin/sh
#
# /etc/rc.d/init.d/cache_ctrl
# Cashier Control Script
#
# chkconfig: 2345 55 01
code....

View 9 Replies View Related

Server :: Unable To Shutdown/reboot Server, No Shutdown Process Running?

Mar 30, 2010

I'm trying to reboot the server (shutdown -r now).But it seems like nothing happened.

When I try "shutdown -c", the system prompts "shutdown: cannot find pid of running shutdown."

View 5 Replies View Related

Programming :: DBD::mysql::st Execute Failed: Column Count Doesn't Match Value Count At Row 1

Feb 24, 2010

I have the following perl/DBI script:

Quote:

#!/usr/bin/perl
use DBI;
my ($db, $user, $pw) = ('dbname', '****', '***********');
my $dbh = DBI->connect("DBI:mysql:$db",$user,$pw) or die "Cannot connect to $db: $DBI::errstr

[code].....

The error message is

[Wed Feb 24 13:03:27 2010] myscript.cgi: DBD::mysql::st execute failed: Column count doesn't match value count at row 1 at myscript.cgi. [Wed Feb 24 13:03:27 2010] myscript.cgi: DBI::db=HASH(0x8a30c60)->errstr

View 2 Replies View Related

Red Hat / Fedora :: Automated Service-shutdown If Load Exceeds A Defined Value?

Dec 1, 2008

i just wanna know if there is some script out there for shutting down a certain service if the load exceeds a specified value?

I've a system with a DBI-Proxy running, most of the time the systems load is about 2~3...if a DB-connection dies, the load rapidly increases (very fast) and after some seconds the load is > 200 and i'm no longer able to shut down the DBI-Proxy manually...or do anything else via ssh...

Now i wanna have a script running in background that checks the system-load permanently and stops the DBI-Proxy if the load exceeds...well, lets say 10 or whatever.

View 1 Replies View Related

General :: Service Startip / Assign Shutdown And Reboot Privileges To The User?

Sep 17, 2009

how to assign shutdown and reboot privileges to the user.please tell directory hierarchy privileges for /root,/bin./lib,/tmp,/var,/pro etc ...

And also i would like to give space quota to particular user and directory for users.

View 4 Replies View Related

Server :: Shutdown The Nodes From The Master Terminal Using "shutdown -h Now" Get Shutdown?

Dec 10, 2010

I have installed a cluster computer with 10 nodes . The manufacturer is HP . All nodes and the master node have redhat enterprise linux installed in them . When I shutdown the nodes from the master terminal using "shutdown -h now" they get shutdown . But they dont get completely turned off . This issue bothers me when the power supply is given , all nodes boot up simultaneously generating a huge heat .

Thing to note : When we shutdown our PC they get completely turned off . When the power supply is given , a press on the Power On button is required to boot the system. But , why does it not happpen in the case of cluster? Is there any other way of completely turning off the nodes from the master terminal ?

View 1 Replies View Related

Ubuntu :: Samba Slow Writes To Server But Fast Reads

Jul 1, 2010

I have a fileserver running 10.04 server 64bit and samba. I connect it to my desktop which is 10.04 desktop 64bit.I have the server mounted on my desktop in fstab as://10.0.0.2/share /media/share cifs guest, uid= 1000.Up until 30 June 2010 it was all fine. Now when I write the server it is very slow e.g. 2Mbps though when I read I get >100Mbps so I think my network is still ok. If i use nautilus smb://10.0.0.2/share I can write at >100Mbps and also read at >100Mbps...So any ideas why the write speed via the fstab mount samba has started to go really slowly in the last couple of days?

View 6 Replies View Related

Server :: Mke2fs Says - Bad Blocks Count ?

Aug 17, 2011

I attached a virtual hard disk to one of my Linux boxes.

And after running creating partition on the new disk, I ran the following command:

Code:

While executing that command, it says as below and quits:

Code:

FYI,the output of fdisk is as below:

Code:

Why is this mke2fs reporting such and is not able to create file system ?

View 1 Replies View Related

Server :: Way To Show / Count How Many CPU Instruction Particular Process Using -or Uses?

Feb 5, 2010

Is there a way to show or count how many CPU instructions a particular process is using or uses?
In my work we develop a web application and I'm responsible of maintaining the web server.
The app lets you handle data online so each client that uses the web application has a folder associated to it, where his data is stored. (/var/www/html/test) for example.
The idea is to get how many CPU instructions the httpd process for that particular folder is having. Is there a way to do this?

View 10 Replies View Related

Server :: Command To Count Inodes With In A Directory ?

Jul 16, 2010

Is there a command to count inodes with in a directory?

I know I can see total inode usage with:
df -i

And I know I can find total number of files with:
find ./ |wc -l

But how can I find inodes? As files over 8kb (if using the default partitioning of 1 node over 2 4kb blocks) would take up more than 1 inode.

View 2 Replies View Related

Server :: Telnet : Configure The Login Retry Count?

Jan 6, 2011

I have two servers running Linux 2.6.9 kernel.When i telnet to server1 , the telnet will be disconnected only after 3 login failures. While, when i telnet to server2, telnet will be disconnected after the first login failure.expect server2 to behave the same way as server1 when telnet is executed.Kindly tell me where i should tweak my servers so that i could achieve what i expect.

View 1 Replies View Related

Server :: Running Cron Every 7 Minutes But To Cary Over 7 Minute Count To Next Hour?

Dec 14, 2010

Previously I had posted a question on how to make it run every 7 minutes between 7 and and 11pm.However now I found out what I really need is every 7 minuted between 7:30 and 11pm BUT it has to be every 7 minutes, it cannot reset itself on the top of every hour, so the */7 wont work.How can it that it will be every 7 minutes, so it will go at 7:30, 37,44,51, 58, 8:05, etc..

View 4 Replies View Related

Ubuntu :: Open Office - Import The Contents From Web Page Table To Presentation Table?

Oct 23, 2010

i need to prepare a presentation for that i have to copy a table from [URL] to my power point slide. but when i am copying it i am just getting a table with single column. is there a method to import the contents from web page table to my presentation table?

View 2 Replies View Related

OpenSUSE :: Kmail Akonadi And Mysql Errors - Can't Open And Lock Time Zone Table: Table

May 3, 2010

Kmail 1.13.2 Problem on startup, error is from nepomuk, data storage. "cannot find Redland backend, nepomuk is disabled until fixed. Also see the following error from the akonadi console:

100503 10:00:15 [Note] Plugin 'ndbcluster' is disabled.
100503 10:00:15 InnoDB: Started; log sequence number 0 31413862
100503 10:00:15 [Warning] Can't open and lock time zone table: Table
'mysql.time_zone_leap_second' doesn't exist trying to live without

[code]....

View 2 Replies View Related

Ubuntu :: Connecting PHP To Sybase Database?

Apr 13, 2010

At work we have a Sybase Adaptiver Server 9.0 database running, it has to stay there for now, and we are developing a web application that will connect to it using PHP.I was already able to make it work using ODBC on Windows and using odbc_connect on PHP.But now we are moving to Ubuntu, and we are trying to get it to work on it.I already have Apache2 and PHP5 up and running.There are two ways (I can think of) we can do this, one is using ODBC and then use "odbc_connect" and the other is making "sybase_connect" work on PHP. Being the latter probably the best one since you wouldn't have ODBC as an intermediary.

Either way, as long as it works I'm happy. ODBC would be fine to meet our requirements for now.I already have ODBC Data Source Administrator but no idea how to create/include/add the Sybase driver.We also tried setting freetds up, but that didn't work either, we might be missing something.

View 9 Replies View Related

General :: Install Sybase ASE 15.0.3 On CentOS?

Jul 5, 2011

I want to install Sybase ASE 15 on CentOS Linux 5.6 has anyone ever done that.

View 1 Replies View Related

General :: Sybase ASE Install On Ubuntu?

Feb 4, 2010

I'm trying to install Sybase ASE EXpress 15.5 on Ubuntu and am getting the following error message: ./startserver: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory.

View 3 Replies View Related

Programming :: Connect To Sybase Using FreeTDS?

Jan 26, 2011

My freetds.conf

Code:
# /usr/local/etc/freetds.conf
# $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
#
# This file is installed by FreeTDS if no file by the same
# name is found in the installation directory.

[Code]...

View 2 Replies View Related

Ubuntu Servers :: Sybase Not Working After Upgrade From 10.04 To 10.10?

Nov 19, 2010

I had sybase server running on my desktop but after the upgrade it does not seam to start properly. tried to restart the server many times but does not seam to help

The logs are displaying as below
00:00000:00001:2010/11/19 13:53:08.21 server Recovery complete.
00:00000:00010:2010/11/19 13:53:08.26 kernel Initializing Job Scheduler Task
00:00000:00010:2010/11/19 13:53:08.39 kernel Installed Job Scheduler sequencer code version 0.27 - 27 tokens

[Code]....

View 1 Replies View Related

Programming :: Accessing A Sybase Database From PHP Running?

May 12, 2011

i get some trouble setting up good environment in linux.i have problem regarding connecting php(under linux) to a sybase server(under windows)is there anyway connecting this two technologies?.

View 1 Replies View Related

Software :: Use HTML Tag In Sybase Stored Procedure?

Jul 6, 2011

I have a query in which i need to display the part of query output in bold

Example: select 'Previous NAV value for the fund is '+ CONVERT(VARCHAR(50),@prevNav) OUTPUT:Previous NAV value for the fund is 12345 so i need to display the output in BOLD like

Previous NAV value for the fund is 12345 OR

Previous NAV value for the fund is 12345

either the value can be in bold or the text can be in bold

View 9 Replies View Related

General :: Accessing - Connecting To A Sybase Database From PHP Running

May 12, 2011

I get some trouble setting up good environment in linux.. i have problem regarding connecting php(under linux) to a sybase server(under windows),,, is there anyway connecting this two technologies?..

View 7 Replies View Related

Software :: Download Sybase Open-client 11.1.1-3.i386?

Jul 13, 2011

I want to freely download and install sybase-openclient-11.1.1.3 either source or rpm package sybase-common-11.9.2-3.i386 either source or rpm package Sybase Adaptive Server Enterprise versions 11.9.2 or 11.0.3.3 for Linux. I searched a lot but didn't get it,

View 3 Replies View Related

General :: What Is The Translation Table And Referance Table In Any DB

Feb 25, 2011

what is the translation table and referance table in any DB (with referance to Data conversion)

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved