Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
11-06-2011, 06:00 AM
|
#1
|
|
Member
Registered: Oct 2011
Posts: 30
Rep: 
|
save terminal to database
Hi,
is there any software on linux to save the terminal output to database instantly? I am currently using Putty to read the Serial port data from the PBX but my online issue is I need to save the data to database please..
Thanks,
Jassim
|
|
|
|
11-06-2011, 06:04 AM
|
#2
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,367
|
Does it have to be done with a terminal? Is it not possible to have a daemon process that reads from the serial port and writes to a database?
|
|
|
|
11-06-2011, 06:07 AM
|
#3
|
|
Member
Registered: Oct 2011
Posts: 30
Original Poster
Rep: 
|
how please?
|
|
|
|
11-06-2011, 06:16 AM
|
#4
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,367
|
It could be done many ways. Which language(s) do you know? What sort of database do you want to use?
|
|
|
|
11-06-2011, 06:18 AM
|
#5
|
|
Member
Registered: Oct 2011
Posts: 30
Original Poster
Rep: 
|
I am new to linux
I am using MySql and I know .NET and C#.
|
|
|
|
11-06-2011, 06:26 AM
|
#6
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,367
|
Assuming the system is Linux, AFAIK we can rule out .NET so that leaves C# unless you want to invest the effort in learning another language. I don't C# but surely it can extract data from a serial port and there must be libraries to write to MySQL.
What you are trying to do does not sound unusual. Might be worth netsearching for a solution before developing your own.
If you do have to develop your own it will be worth netsearching for examples of how a program can daemonise itself, read from the serial port and write to a MySQL database.
|
|
|
|
11-06-2011, 06:29 AM
|
#7
|
|
Member
Registered: Oct 2011
Posts: 30
Original Poster
Rep: 
|
as you said, i can do it easily using C# and MySql but the project I have is purely Linux backend...
|
|
|
|
11-06-2011, 06:31 AM
|
#8
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,367
|
Isn't C# enough like C++ for you to be able to program it on Linux?
|
|
|
|
11-06-2011, 06:33 AM
|
#9
|
|
Member
Registered: Oct 2011
Posts: 30
Original Poster
Rep: 
|
I am not sure about C# on Linux. If it's possible then it won't be a direct solution from Microsoft.. It might be another third party
what about Linux it self? any other solution?!
|
|
|
|
11-06-2011, 06:38 AM
|
#10
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,367
|
GNU/Linux has a FOSS c++ compiler, gcc ("GNU/Linux" because Linux is only the kernel; many utilities including gcc are provided by GNU).
Alternatives? C, Ruby, python, perl, bash ... each with their pros and cons for developing in and for the problem/solution domain.
|
|
|
|
11-06-2011, 08:52 AM
|
#11
|
|
Senior Member
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 3,832
|
If I understand well, you have a serial connection to your PBX. A PBX is a telephone switch, right? (Public Branch eXchange). And now you are getting data (perhaps calling data, dialled numbers, durations) from that PBX and you have to store that in a database. Right? The next question will be how to represent the data you stored, how to search, produce statistics etc?
I am not sure whether you do this as a pure hobby project (just nice to have), but since PBX-es do not often appear at the home I assume you have been given a professional assigment.
Well, if you are able to fulfill this assigment, I hope you understand you should do some reserch first as to design what your needs are. Rather than wondering what programming language you'd need to pipe your terminal data into MySQL.
If it less severe than this, we would be happy to help you, if you can tell what the requirements are for your program, but more precise than piping it into MySQL.
jlinkels
Last edited by jlinkels; 11-06-2011 at 11:32 AM.
|
|
|
|
11-06-2011, 08:59 AM
|
#12
|
|
Member
Registered: Oct 2011
Posts: 30
Original Poster
Rep: 
|
this is my brother's small office.
There is a PBX (yes phone exchange) and I want to read the data..
I m able to read it with no issue except it's not saving into database so if they server crashed or was restarted then I am losing all the data.
I am currently using Serial PBX logger from Eltima software which is free and does the job. It saves the serial port data into a text file but they only issue here it is on Windows and I am planing to move the environment in my brother's office all to linux backend..
so it's a project for him and it's a study case for me because I am new to linux 
|
|
|
|
11-06-2011, 10:25 AM
|
#13
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,367
|
Sounds challenging to move your brother's office to a Linux back-end when you are new to Linux
Have fun  and tread carefully 
|
|
|
|
11-06-2011, 10:32 AM
|
#14
|
|
Member
Registered: Oct 2011
Posts: 30
Original Poster
Rep: 
|
Thanks 
|
|
|
|
11-06-2011, 11:31 AM
|
#15
|
|
Senior Member
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 3,832
|
Quote:
Originally Posted by jrahma
I am currently using Serial PBX logger from Eltima software which is free and does the job. It saves the serial port data into a text file but they only issue here it is on Windows and I am planing to move the environment in my brother's office all to linux backend.
|
That has nothing to do with database storage, it is a simple logging utility. See if ttylog is suitable for you. Should be available in the repository of your distro. This is hearsay, I did not apply it myself, just found it in Google.
Minicom and associated logging is more sophisticated, but limited if the PBX does not dump ASCII.
jlinkels
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:03 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|