linux

Converting serial port data to TCP/IP in a linux environment

Thank you in advance. I need to get data from the serial port of a linux system and convert it to TCP/IP to send to a server. Is this difficult to do? I have some basic programming experience but not much experience with Linux. Are there any open source applications that do this? Again thank you for any help. ...

Time remaining on a select() call ...

I'm using select() on a Linux/ARM platform to see if a udp socket has received a packet. I'd like to know how much time was remaining in the select call if it returns before the timeout (having detected a packet). Something along the lines of: int wait_fd(int fd, int msec) { struct timeval tv; fd_set rws; tv.tv_sec = msec...

Non-blocking mount in Linux

I use Linux's mount(2) function in a single-threaded process. But mounting of devices devices like CD-ROM may take a while (worst I've seen is 40 seconds!), as it will ponder a little, spin up the disk, and only then will mount the filesystem. This may block the process from processing other events for considerable time. I cannot seem t...

Simplest way to get access to a remote server for computing tasks

I'm working on some academic research projects involving scraping large data sets from the web using Python. It's been inconvenient to work on my academic institution's Linux server because (1) I don't have superuser access, meaning I'm dependent on the IT staff to install my packages, and (2) my disk quota is somewhat limited (I would i...

linux/shell script

Hi I have written a program which generates parameter index for 2 variables. Say, a and b in steps of 5. like this I have to do for 23 variables. So I don't want to write 23 for-loops to run, how can I make it into a single for-loop which is common for all 23 variables. I hope it can be done with an array, but i don't know how to implem...

How can I add a line to a file in a shell script?

I want to add a row of headers to an existing CSV file, editing in place. How can I do this? echo 'one, two, three' > testfile.csv and I want to end up with column1, column2, column3 one, two, three (nb changing the initial CSV output is out of my hands) EDIT: I originally had this as 'using sed' but any standard command w...

phpMyAdmin - Did the Config files change?

I have just installed phpMyAdmin on my new Fedora Core 10 dedicated server. I downloaded the phpMyAdmin-3.1.2-english.tar.gz. I extracted it and placed it in this folder /opt/phpMyAdmin-3.1.2-english and i created a symbolic link in the /var/www/html directory so that I can access it like this: http://www.mydomainname.com/webdb. When I...

X window forwarding?

How could I forward the X window output from a program under Linux (Debian Lenny)? Any suggestions and / or experience? The easiest way would be to restart the process with a new DISPLAY enviroment variable, but I don't want to take down the process at all. What I'd like is to change the X output to another machine "on the fly"... Appa...

Easiest way to create a virtual LAMP machine on Windows XP?

I need to set up a test environment on my XPSP3 machine that runs Apache, MySQL, and PHP. My original test environment was an old box that ran those three under Win2k. That box died. Running on Windows was never optimal because the ultimate hosting environment is CentOS Linux. What is the most straightforward way to set up a virtual mac...

What Process is using all of my disk IO

If I use "top" I can see what CPU is busy and what process is using all of my CPU. If I use "iostat -x" I can see what drive is busy. But how do I see what process is using all of the drive's throughput? ...

MySQL - ERROR 1045 - Access denied

In some way I have managed to get this error when I try to access into MySQL via the command line: [root@localhost ~]# mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) I have tried resetting the password without any luck using this HowTo. I have uninstalled mysql com...

What database tool to use on Linux to read an as/400 database?

From Linux (Red Hat dist), we need to read an AS400 database. We have the ODBC driver to connect, what's the best query tool? ...

compiling multiple files in netfilter

How can I compile multiple files (files calling functions in other files) in kernel module? ...

Best strategy to check harddisk issues on Red Had Linux

What is the best strategy(and utility) to check hard disk related issues on red hat Linux ? ...

Modifying files on remote Ubuntu server from Windows PC

I am developing some Python programs that I'm running on a remote Ubuntu Linux server (hosted on Slicehost). I would like to work on the source in an IDE on my Windows Vista PC, and have all file modifications sent directly to the Linux box without my intervention (i.e. without having to manually SFTP the files each time I change them). ...

run a web project developed in Java run on both windows and Linux platform

Hi, I have a web project developed in java. I am using the Windows platform and accessing the project from the Windows machine itself. How can I make the project run on a Linux machine? I am using jboss server and deploying the project. Regards ...

What do I need to do to get a JS3 environment (or at least couchdb) up and running?

I'm primarily a front-end coder but I'm not a stranger to server-side programming or the command line. Regardless I've still got a lot to learn about setting up servers and whatnot so I was wondering if anyone could help me put together some steps for setting up CouchDB on (preferably) ubuntu. That's my main goal but I'd also like to ge...

Is there a KDE systray epplet for Enlightment?

Enlightenment DR16 is packaged with openSUSE 11.1 but it's a bit painful to use with KDE apps as there's no obvious (on the Enlightenment site, google etc.) way to provide a systray for KDE apps that require one (e.g., ktorrent). Anyone know of a way around this? I'm not using e for the eye-candy - I'm running on a 2.6GHz Celeron and K...

How can I get the CPU core number from within a user-space app (Linux, C)?

Presumably there is a library or simple asm blob that can get me the number of the current CPU that I am executing on. ...

Fitnesse RestFixture on Linux

I've been using the RestFixture in Fitnesse to test a REST service which is running under Tomcat. When Fitnesse is run on Linux (Redhat to be precise) the fixture doesn't pass any querystrings to Tomcat (the log entries prove this). However, the exact same fixture running through Fitnesse on a Windows machine works as expected. Has anyo...