Linux - NewbieThis 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.

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.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

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..

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.

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.

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

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.