Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 08-15-2005, 04:05 AM   #1
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>

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, 09:08 AM   #2
LQ 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, 09:15 AM   #3
Registered: Feb 2005
Posts: 71

Original Poster
Rep: Reputation: 15

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.


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

All times are GMT -5. The time now is 03:43 PM.

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