LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-03-2009, 02:50 AM   #1
d-cam
LQ Newbie
 
Registered: Aug 2009
Location: South africa
Distribution: red hat
Posts: 2

Rep: Reputation: 0
a Script to shutdown a service when a Sybase table reads over a certain count


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 ?

any help would be really appreciated

thanks in advance
 
Old 08-03-2009, 10:46 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Well, on RHEL its

service httpd stop

although you'd prob need the program to have root privs, possibly via sudo.
I'd probably do this in Perl, but if you're comfortable with Java (you mentioned tomcat) that would work too.
What have you got so far?
 
Old 08-11-2009, 06:07 AM   #3
d-cam
LQ Newbie
 
Registered: Aug 2009
Location: South africa
Distribution: red hat
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
Well, on RHEL its

service httpd stop

although you'd prob need the program to have root privs, possibly via sudo.
I'd probably do this in Perl, but if you're comfortable with Java (you mentioned tomcat) that would work too.
What have you got so far?
Thanks i will try searching on Perl

i am a total noob on this OS and that comes from working predominantly with Windows GUI for the last 5 years.

But i am sllllloooooowwwwwwly getting the hang of RH linux and finding it very intersting

thanks for the pointer
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
script to count lines kalimat Programming 16 12-15-2008 04:09 AM
php script that reads content from text file adrianno2 Programming 3 07-21-2008 01:14 AM
script/service/command executes during shutdown shipon_97 Linux - Newbie 1 08-30-2007 03:19 AM
Fatal error when cfdisk reads partition table on 160GB disk glasisch Linux - Newbie 1 05-22-2005 10:44 AM
How to create a shell script that reads something from stdin? ricky_ds Programming 2 05-17-2005 05:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration