Programming :: Read Console Output From Remote Server?
Jan 20, 2009
when the user clicks a button (assume war application) and the action'system.out.println' a message, how can I *remotly* read this message (read the message from a different computer instead of the server)?when I use the eclipse, I can read it from the console but if I'm in adifferent location, how can I see this message remotely?I'm thinking about remote debugging (JPDA), however, it's very difficult to configure in order to make JPDA run. I tried based on tutorial of google search, bug failed.I wonder if remote debugging can actually solve my problem. If not, is there any other to solve
View 1 Replies
ADVERTISEMENT
May 18, 2009
I need to output of the script to the remote server via redirect. I created a simple script for your reference.Quote:
#!/bin/bash
W=`/usr/bin/w`
FREE=`/usr/bin/free`
[code]...
View 4 Replies
View Related
Mar 7, 2010
How can i obtain the pid of a process, by using a function?Like i know if i write x = system("pidof teste"), x is not the pid of the program teste but it is equal to 0.How can i know the output of a command like that, but make it in a a program in C?
View 1 Replies
View Related
May 3, 2011
When I run 'sendmail -bv', it sends the mail delivery status report as a mail to the root. Is there a way I can redirect this to the console instead of sending as a mail. requirement is to programatically find the mail host of the recipient for which I thought of using this 'sendmail -bv' command. Is there any other better way to find mail host of the recipient
View 12 Replies
View Related
Mar 15, 2010
i have wrote a long piece of code above with the "main" which is calling openFile( &fout, filename )filename contains the txt name in a form of "data.txt"i wanna read the data from the file and output it into fout for later use.the data in that file is a vector looking interger group.i have the following code:
int openFile( ofstream * fout, const char * filename)
{
ifstream iFile(filename);
[code]...
View 1 Replies
View Related
Dec 10, 2010
I have the following code:
Code:
#include <stdio.h>
#include <stdlib.h>
int main() {
system("ps -ef | grep myprocessname");
return 0; }
When I run this program it outputs the following list of running processes:
Code:
root 10279 10275 0 13:02 ? 00:00:00 myprocessname myvar1=value1 myvar2=value2
root 10341 10337 1 13:02 ? 00:00:00 myprocessname myvar1=value1 myvar2=value2
What I want to really do is instead of writing the output to screen I want to read the output and parse the various values value1, value2 etc. What is the best way to do this?
View 4 Replies
View Related
Jun 5, 2011
how should I read below output of lm_sensors ? Im interested ONLY with temp1 and temp2.I suspect that temp1 presents motherboard chipset temp and temp2 CPU temp. I hope this is like this... but I have no 100% assurance.
Code:
~# /usr/local/bin/sensors
w83697hf-isa-0290
[code]....
View 3 Replies
View Related
Mar 12, 2010
Basically the requirement of the script are :
1. need to run like a daemon which will read an active squid logfile in a refresh pattern of 5 minutes
2. calculate the total number requests based on different domains that the client access
3. calculate the total of number of requests based on different domains as well as the turnaround time of these access is more than 5 sec that the client access
4. calculate percentage of item 3 over item 2
5. report the results in html format as follows:
Domain Name Total req Req > 5 sec % of req > 5 sec
6. able to access the results from web browser.
View 8 Replies
View Related
May 25, 2011
I want to search for 1 file (say test.txt) on first server and all the output of this search to be greped as per my requirement and then transfered on the second server at the same location where they were on first server.
E.g.
output of search of file (test.txt) >> output.txt
/tmp/test.txt
/home/cpan/test.txt
/opt/cpanel/test.txt
Now I want to grep this output to only related to cpanel,
for f in 'cat output.txt'
echo $f | grep "cpanel"
if [ $? -eq 0 ]
then do scp.
But I am bit confused here, as in how to use scp command here.
scp $f root@second_server:/$f ?
View 3 Replies
View Related
Mar 2, 2011
i have made a java web server which works on localhost.but now i want to capable it handling many clients at a time.so clients running on different computer need machine name or IP address of server computer.How can i do this in java?
View 1 Replies
View Related
Aug 4, 2010
1)We need to do a clean up a folder in a remote unix server . What is the best option to connect to remote server? how do we use ssh ? Is there any prerequisite to use ssh?
2) We have to SCP few files to another folder in a remote unix server . I formed the below command to use in script. Is it of correct usage? scp -r $POS_HOME/posctl [login nameip address:/home/username/directory]
I have seen public key/private key generation part for SCP. How do we handle this? Does this need to be done as unix admin?
View 7 Replies
View Related
Mar 14, 2010
I have a webGUI in php where users can make certain settings. How can I edit a file on a remote server from my php webserver? Currently I use my FTP client, vsFTPd and a chrooted user in a specific directory where the file resides. I think this is pretty save as long a nobody else uses my FTPclient. How can I make changes to this file on the remote server from within my php-code on my webserver ?? (so that not I need to make the changes but my users can do it from a html-form) I found this but the credentials for the FTP-connection are plain :
<?php
$file = fopen ("ftp://loginasswd@server", "w");
if (!$file) {
echo "<p>Unable to open remote file for writing.
";
[code].....
I use https for the webGUI, but I guess this does not mean the connection to the remote server will be encrypted also ? Can I use my FTP-user (has no shell) from within php to edit the file ?
View 12 Replies
View Related
Apr 11, 2010
I can get a dynamic image to display in my webpage<td><img src="<? echo image.php" ;?>"where image.php is some ones example that outputs some characters to screen.All works fineBut the site is ssl,and It wont load the "foreign" object for security reasons.I was wondering I cURL could trick the browser into thinking that the image source is still on the same serverlike
<?php
$remote = 'https://example.com/image.php';
curl_setopt($ch, CURL_SSL_VERIFYPEER,0); // for testing
[code]....
View 1 Replies
View Related
Apr 11, 2011
I'd like to redirect the output to a file and to the console. I know about tee but the issue is that it waits until the first process finishes.e.gecho "hello world" | tee test.txtfirst calls echo and then tee.Is there a way to redirect "on the fly" ?
View 5 Replies
View Related
Mar 10, 2011
I'm using mplayer with shell-fm, in my shell-fm.rc I have the line
extern = nice -10 mplayer -really-quiet -ao jack -cache 512 -noar -nojoystick -nolirc -noconsolecontrols -nomouseinput -demuxer lavf -lavfdopts format=mp3 -af-adv force=5:list=resample -af resample=44100:1:2:extrastereo-1.5 -
This to me at least produces a pleasant audio output but despite the -really-quiet option mplayer is still outputting text, generally something like
[mp3 @ 0xa3f5380] max_analyze_duration reached
I've also tried the -msglevel all=-1 option and had a play with the MPLAYER_VERBOSE environmental variable, all with no joy.
View 6 Replies
View Related
Oct 13, 2010
when I use e. g. cat file.txt | grep --color=tty "pattern" I get the pattern I search highlighted. When I want some more context around each hit, grep has the -A, -B and -C parameters. However, I want to display the whole file (or whatever command output) and highlight a certain pattern. Does such a highlight command or tool exist?
View 5 Replies
View Related
Jun 9, 2011
Is there a way to color particular words printed on console based on user preference? For example I need to color text 'error' when a particular program is compiled.
View 2 Replies
View Related
May 28, 2011
Is there a way to get console output over a serial (COM) port? I have a box that I use as a NAS, DNS, DHCP and mt-daapd server, I don't have a spare monitor and it is not worth buying one just to use it once or twice a year.
I found this guide [url] but it doesn't work with Natty
View 3 Replies
View Related
Dec 30, 2010
i'm looking for a way to output a bash script to the console before login.It should be executed after boot in rc.d scripts with the output on the console0. It is for a asterisk box.This is the script. It use the watch command to output the active calls on the box in realtime.Code:watch "asterisk -vvvvvrx 'show channels verbose'"Btw,
View 6 Replies
View Related
Jul 11, 2011
I'd like to remotely administer my Linux machine at home whilst I'm at work. Only ports 80 and 443 are avaiable, through an HTTP proxy. I don't want to install tunnelling software.What I really need is something that'll run on my server and display a console inside a web browser.
View 3 Replies
View Related
May 14, 2011
I want to copy a file to all RHQ-Agents through out RHQ-Console.
View 1 Replies
View Related
Jan 17, 2011
I am new to scripting, would like to have a script that tests whether a directory exists on remote host & display the message accordingly. The remote hostname can be provided by means of file containing list of hostnames. Can use rsh for connecting to remote host.I tried with couple of scripts by searching google but didn't get desired result. Please help me, below is my efforts, $file contains list of hostnames.
View 10 Replies
View Related
Dec 6, 2010
I am having a java program which will read characters from console. i have started my program from bash shell and now the program starts and waiting for the inputs. Say I have typed text , "hello". If i try to move the cursor position back wards using the left arrow button it was not working. Instead some junk characters are printed on the console like ^[[C .
hello^[[C^[[C^[[C^[[C^[[C
Below is my program.
public static void main(String as[]) {
BufferedWriter outputWriter =
new BufferedWriter(new PrintWriter(System.out));
[code]....
Note: In windows its working fine.
View 6 Replies
View Related
Jul 1, 2011
I downloaded rhel 5.5 CD 1 iso to my PC, and used it as a virtual CD-ROM to kickstart HP DL380 G4.Here is my questions:
1. how can I cut and paste boot commands (very long strings) from my PC to iLO remote console?
2. is there anyway I can get "boot prompt" by ssh to iLo's IP?
3. after kickstart, I want to eject the virtual CD-ROM / media, I have tried the following method in the kickstart profile, but all failed, after reboot, it still boot from the virtual CD-ROM. So how can I reject the virtual CD-ROM for rhel 5.5 kickstart?
View 1 Replies
View Related
Sep 25, 2010
for few days vlc is quiting with segmentation fault. my system:
[Code]...
problem is with every file. the output on console is very limited
[Code]....
other video players, xbmc, smplayer, cvlc are OK. What can I do to fix it?
View 3 Replies
View Related
Jul 11, 2010
When I start an upgrade or dist-upgrade from single-user mode, and walk away for a long time, I will have found that some packages insist on prompting for answers to questions midway through. That requires me to physically check the console periodically, and that becomes less practical for long upgrades.Is there a way for me to somehow remote into that console and answer any prompts that would popup? By "way" I mean not involving KVM switches or other hardware other than the LAN setup I have now (i.e., I am able to ssh into the machine being updated from another machine, but not when the machine is in single-user mode).
BTW, the reason I am using single-user mode is that, in the past, I have had problems with upgrading packages like GNOME when I am logged into the GNOME Desktop.
View 8 Replies
View Related
Jan 26, 2011
When I try to play a dvd and give mplayer no options, it defaults to "X11" for the video output, which maxes out the cpu. To get around this, firstly I tried to play the dvd using "cvidix" in the console.
I used the following command:
mplayer -ao alsa -vo cvidix -fs -framedrop -stop-xscreensaver -dvd-device /dev/dvd1 dvd://1
This played the dvd, but the console text was still visible over the top of the movie; i.e. mplayer was playing in the layer beneath the console text
Then I tried using xvidix in X:
mplayer -ao alsa -vo xvidix -fs -framedrop -stop-xscreensaver -dvd-device /dev/dvd1 dvd://1
This gives a green line about 5mm thick down the right side of the screen, but other than that it is ok.
View 6 Replies
View Related
Jan 17, 2010
The author (somewhere on these Ubuntu forums directed........ Ctrl + Alt + F1 which I thought was going to be the "Terminal" but nothing similar. I have about a half dozen different names/passwords for Ubuntu but none will work to log in. How to get out of this text console and back to Ubuntu GUI? And, how to read my lost LogIn name and password for this "Text Console"?
View 2 Replies
View Related
Jun 30, 2010
I had logged into a remote server through ssh and was runing some rsync commands on the server. Rsync was outputting information in the ssh cli when the client machine (the machine I was using) crashed because of an unrelated issue. Normally, if, say I'm are downloading something with wget, I usually output the info to a log file and then I can simply tail that file later. But what if I'm not using a log file? Is there any way to later log back in to a system via ssh and resume the output I previously had?
View 5 Replies
View Related
Mar 24, 2011
Here's the scenario, rsync is running in RMT on tty2. I (LCL) am connected to RMT remotely as root over ssh. Is it possible to grab output of RMT's tty2 on my LCL? I don't want to redirect RMT's tty2 out to my pts, just get a mirror output.
View 6 Replies
View Related