Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/03/2009, 04:59
fito2006
 
Fecha de Ingreso: junio-2007
Mensajes: 20
Antigüedad: 17 años
Puntos: 1
comunicacion entre procesos

Bueno, pues tengo que hacer unos ejercicios y me estan costando. Para empezar, solicito ayuda, pues estoy de ERASMUS y en el pais destino me entero mas bien de poco y por eso os solicito. Los problemas que tengo pegas son los siguientes:


1.- Implement a daemon that periodically store or save in a text file,
given in the calling argument, the active processes list obtained with the
command ps u.

aki lo que hago es crear un proceso, crear un hijo y luego matar al padre. hasta ahi bien. Ahora solo me falta lo de listar a un archivo pasado por parametro.

2.- Implement a daytime daemon as described:
The executable program should be called dtd; it should support from 1
to 100 concurrent connections and the ability to listen to the port 5000;
to a client request, that is just a connection to the server, it will answer
with a line with the following format
<week day><month><day of the month><hour:minute:second><year>
and then terminate the connection.
To test the daemon use:
$ telnet 127.0.0.1 5000


3.- Implement a finger daemon as described:
The executable program should be called fingd; it should support from
1 to 100 concurrent connections and the ability to listen to the port 5000;to a client request, being established the connection, follows a user login
name; the server will answer with the name of the user and then
terminate the connection.
Daemon testing example:
$ telnet 127.0.0.1 5000
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
mmadeira
Margarida Madeira
Connection closed by foreign host.
Note: The user name can be obtained from the file /etc/passwd. In the
classroom computers, it is suggested the use of the command ypcat
passwd in order to obtain such information.






Por favor, si alguien tuviese estos script se lo agradeceria me los enviara o indicara la mejor forma de hacerlo, pues solo para estos ejercicios me dan 24 horas para hacerlos. Muchas gracias a todos.