LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-15-2005, 03:05 AM   #1
abdul_zu
Member
 
Registered: Feb 2005
Posts: 71

Rep: Reputation: 15
Linux live application


Hi experts,

I wanted to developed on simple "Hello World" application in c++. I can make this script but i want to run this script as service in linux box. When first time i compile this script it should be start as service and any time if pass some command to display the "Hello World" it should be display.

the script is:

#include <iostream.h>

main()
{
cout << "Hello World!";
return 0;
}

Can i run this script as a service, or i can include this in any application like mysql when any requests come to mysql my script start to work.

Actually this is very simple script i want to test. i have very important one script for VoIP radius (freeradius) for user balance update. i want to update the user balance when any request come to mysql. i can use the cron commond to run script but the minimum cron time is 1 minute and i want to run this script each seconds or each request comes to mysql.

I hope i am able to express what i need.
Please if some one has logic please let me know how i can do it?

Thank You
Abdul Lateef
 
Old 08-15-2005, 08:08 AM   #2
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
the word "service" doesn't really exist in unix world... "service" applications are something that only exist in windoze world, in unix, you add scripts, applications or programs to "bootup script" but their code (of the scripts/application you want to run on boot) will not be any different. They just run on boot, in an automated way, but it would just like you start these yourself by hand.

Now if you want to run your script everytime your mysql receive a request... Well, I'm not an MYSQL expert, not at all, but I suppose it is possible to so, with some tweak. You could, as example, log all request into a files then make a C program that perform some operation when a certain request is written into the files.
BUT, doing so (running a script at each request) would be _very_ intensive, I wouldn't recommend it, it will probably kill the performance of your server... what will your script does exactly? Maybe there is better way to do so?
 
Old 08-15-2005, 08:15 AM   #3
abdul_zu
Member
 
Registered: Feb 2005
Posts: 71

Original Poster
Rep: Reputation: 15
Hi,

I have two table table1 and tabel2. I want to insert data into table2 when any new record inserted in table1. and the table1 is connected to our radius server which is inserted all accounting records. And I created tabe2 for some our particular big customer so all accounting related this customer, we want to insert in his table (table2). Maybe using perl or c script no problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Computational Application in Linux TigerLinux Linux - Software 6 11-19-2005 10:22 PM
how to link helpblocks application to gtk application m.harshavardhan Linux - Software 0 08-16-2005 08:39 AM
how i migrate windows application to Linux base application vandarakalpesh Linux - Software 0 06-26-2004 03:34 AM
VB developped application under Linux seicfano Linux - Software 1 05-26-2003 06:20 AM
diff in Linux Driver n Linux Application abinash_y Linux - Hardware 2 05-18-2003 06:07 PM


All times are GMT -5. The time now is 08:11 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration