Programming :: Unix Process Id In Jdk1.4.2?
Mar 2, 2009
what is the best/accurate way to get the process id in java code in order to write to the log file. To be specific: I am using avalon logkit for logging. I really cannot find a way to write the process id to each line in the log.
View 1 Replies
ADVERTISEMENT
Sep 28, 2010
i want a process that can operate as both a TCP echo server and a UDP echo server. The process can provide service to many clients at the same time, but involves a single process that does not start up any other threads.
View 3 Replies
View Related
Aug 10, 2011
Possible Duplicate:
Linux: Is there something similar to "top" for I/O?
I am trying to do some CPU intensive operation on a Linux machine and it is showing very high load.
I want to figure out if this load is due to I/O or CPU usage. How could I get the percentage of I/O usage by process?
View 3 Replies
View Related
Jan 24, 2011
I`m looking for solution. Is it possible to run process on 1 core in UNIX ? From time to time I must start some very CPU consuming process and unfortunately this process is running on all cores... so at this time working on PC is very hard.
View 3 Replies
View Related
Jan 18, 2010
At the unix command line if i press Ctrl-C,that does not end a process but rather interrupts it and i return to the shell prompt. So,i have the following two questions:1.Is there a way i can see the list of all interrupted processes and end them ?2.What key combination to press to end a process instead of interrupting it ?
View 7 Replies
View Related
Mar 16, 2011
Unix command that allows to know which process is running on processor core?
View 2 Replies
View Related
Sep 28, 2010
A simple TCP based chat server could allow users to use any TCP client (telnet, for example) to communicate with each other. For this question you should consider a single process, single thread server that can support exactly 2 clients at once, the server simply forwards whatever is sent from one client to the other (in both directions). Your server must not insist on any specific ordering of messages as soon as something is sent from one client it is immediately forwarded to the other client. As soon as either client terminates the connection the server can exit
View 4 Replies
View Related
Nov 15, 2010
Is there any way to monitor one process' CPU usage and RAM usage over time on Linux? I am trying to change to a cheaper VPS and need to work out what level of CPU and RAM I need!
View 2 Replies
View Related
Nov 9, 2010
I have a shell script to identify whether the process is running or not. If the process is not running, then I execute another script file to run my application. Below is my script and saved this script as monitorprocess.sh Code: #!/bin/bash
result=$(ps -ef | grep -v grep | grep "applicationname.sh" | awk '{print $2}')
echo $result
if [ "$result" == "" ];
[code]...
View 4 Replies
View Related
Mar 31, 2011
Is there any difference in cpu usage for process in init.rc(runs automatic when boot is happened) and manually running process. Will these both have same priority by default...?
View 1 Replies
View Related
Nov 26, 2008
I tried googling but didn't get any answer for this.I have a process called "abc" and it is running with PID "123".I have a putty session opened with PID "999".I am giving kill -TERM 123 from putty session.My process "abc" before dying it should catch the PID of the terminal which provided TERM signal to it.Is there any way to find this out
View 2 Replies
View Related
Jul 28, 2010
I am a newbie to Linux. I tried setting environment variable using export JAVA_HOME=/usr/java/jdk1.6 but that was not permanent (i.e is was there for that terminal session). I want to know how can i set environment variable permanently in Fedora 13 just like we do in windows.After google search, some user suggested to edit bashrc and profile file for setting environment variables but above file contains some shell programs.
View 3 Replies
View Related
Sep 17, 2009
I have java jdk1.5.0_08 installed on linux x86_64 architecture and I can execute java -version no problem. I took the same binaries and installed on ia64 architecture and the command java -version gives and error "cannot execute binary file" The Linux OS versions are 2.6.18-128.1.10.el5 on x86_64 and 2.6.18-128.4.1.el5 on ia64 Do you know whether the jdk1.5.0_08 binaries are compatible between x86_64 and ia64 architecture. The answer may be no, but I may be wrong and there could be some other issue. Where can I get the jdk1.5.0_08 specific to ia64 architecture for Linux version 2.6.18-128.4.1.e15
View 1 Replies
View Related
Jan 12, 2011
my instructor gave me a project in c programming language, the probelem i don't have a c program combiler and i don't have a unix os on my computer, and my knowledge in c program is soo weak i took it years ago, i have this code but it does't compile on Dev-C++ on Windows OS, so if you just help me out with this program:
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
[code]....
View 5 Replies
View Related
Jun 9, 2010
I want to read the line in the text file and get the string in the file and paste it in the directory column
for example i have a line like /ftp/prod/SWC1407.DOC
from this 1407 should be parsed and appended at the end of the move command
mv /ftp/prod/SWC1407.DOC /nfp/1407
View 7 Replies
View Related
Sep 16, 2010
I wish to create my own shell for my operating systems project in college...
My professor has asked me to make sure that my shell can execute at least 30 or 40 commands... I have around a month's time
I have seen endless source codes in the net, I'm not able to understand any of it
How do i get about doing it?
View 2 Replies
View Related
Jun 2, 2010
How simulate unix kernel in c++..or give me a link....
View 2 Replies
View Related
Oct 31, 2010
There are C, C++, Java, Perl, Python, PHP, and some other programming orand scripting languages for a Unix / Linux Distro. On a scale of 1 - 10, I rate myself on:
5 for C / C++
5 for Java
7 for PHP
2 for Perl
When I look for a Unix job I am often asked if I know C / C++, Perl or Java. Well, they mostly look for C / C++ + Unix or Perl / Python + Unix or Java + Unix combinations. That is the trend here in India. When they advertise for C / C++ + Unix they also mean Real Time System, Kernel (Modules), and Device Drivers Development. I don't know how to do those things in C / C++. But I must say that I love C / C++ and anything else no matter how attractive or easy it could be doesn't look that much challenging to me. So, which should I take now to add to my skills set and be more productive in terms of System Administration and Application Development and Support?
In C/C++ and Java, though I know them, I don't get to work in my current job. However, I often use Shell Script (Bash) and PHP and so I am finding Perl easy because the basics of Computer Programming that I learnt by learning C and C++ and Java have made it easy for me to understand any programming language.
View 2 Replies
View Related
Mar 8, 2010
I have a hard time figuring this out. I need to replace the date formats of arrival date(column 31-40) and departure date(column 42-51) and I need 2 outputs. I cannot even figure out how to start.code...
View 6 Replies
View Related
Jun 16, 2010
I got some problems and need your help.
In school, my codes are writeen under UNIX system (Solaris10/SUN), now I need to transfer those codes to Linux (Redhat5). But after I directly copy to Linux, it shows many errors and warnings.
Does anyone know which codes I need to modify to specifily suit for UNIX? I am not familiar with those systems and hope to get your kind help.
View 5 Replies
View Related
Apr 7, 2011
creating the below unix script to run in oracle database .I need a script which should do the following things.
1. The script should insert row count of a table from one database(A) into table (AB) in another database(B).
2. The script should update tow count of the similar table and tablespace from database (B) in to a table AB.
3. The script should update the status column of the table AB as: 'Y' if the rowcount of the table@A and rowcount of the table@B matching. or else it should update 'N'
View 4 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
Nov 22, 2010
I need to write a windows batch file to run unix commands by logging onto a telnet unix server. For example , I might want the batch file to log onto the unix sever, run the ls command, collect the output in a file and ftp it back to my windows desktop
View 8 Replies
View Related
Mar 18, 2009
I have a written a java code to ftp a file from the windows box to unix box. It keeps giving me the following error : "java.io.FileNotFoundException: PORT 204,63,56,5,16,78: 550 Permission denied." I am able to ftp manually from windows to unix.
View 5 Replies
View Related
Jan 20, 2010
I'm new to Unix and every signal handler algorithm I've seen is more or less a copy of what I'm trying to do.[URL] designing a signal handler with sigwait in UNIX?
View 1 Replies
View Related
Sep 18, 2010
Im using this unix command(in a php file) to remove a certain string and then remove the whitespace left by that string. Unofrtunately in many cases, the files get completely erased. Is there a workaround?
Code
<?php
$dir = "./";
$rmcode = `find $dir -name "*.php"
[cod3e]....
View 14 Replies
View Related
Nov 9, 2010
I have a shell script to identify whether the process is running or not. If the process is not running, then I execute another script file to run my application. Below is my script and saved this script as monitorprocess.sh
Code:
#!/bin/bash
result=$(ps -ef | grep -v grep | grep "applicationname.sh" | awk '{print $2}')
[code]...
View 14 Replies
View Related
May 11, 2010
I have a few questions regarding HTML, UNIX and Javascript. I've been tasked with creating a fairly simple webpage that takes a few inputs. Each input must correspond to an argument in a UNIX command running on a server.On a UNIX server we have a script (.ksh) that takes 3 arguments. The result of the script is a data file which is FTP'ed to an external server. Let's forget about the FTP portion for now. I would like to know where I should begin.What I know so far:
1) I will need HTML to create the webpage. Skill level is high
2) I will need Javascript to make my webpage more interactive. Skill level is high.
3) I will need to understand the UNIX environment. Skill level is high.
View 8 Replies
View Related
Jan 28, 2011
currently I've got a big problem on programming with sockets. I use the winsock2 API and want to receive data from a multicast adress running on a UNIX-PC. The connection works fine and I really receive data from this group, but as it seems not the right packages. The received data is saved in a char[]. E.g. at received_msg[12] is a float value. This one I would like to read out, convert and use it in later progress the next value is y at received_msg[16]. The same Code works on a Unix PC with unix sockets but converted to winsock I've got the described problem and I have to make this code work under windows.
Here a piece of the code (received_msg[12]='3f'):
Buffer is a struct containing the two float values x and y. If I convert the char as this under windows the value of x is a huge number. The correct value is around 192, so receveid_message[12] should be 1.92. Could it be that the Unix-PC is sending data in an other way than the winsock receive it?
View 2 Replies
View Related
Mar 10, 2011
I want to kill parent process after "fork()" method. but if I kill parent process with "exit(0)" method, main() thread is terminated as well so child prosess doesn't work anymore. Is there any way to kill only parent process without affecting to child process?
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
[code]....
View 1 Replies
View Related