Sponsored Content
Top Forums UNIX for Dummies Questions & Answers hi i need help with socket programming Post 302408849 by leandroJapa on Wednesday 31st of March 2010 07:42:47 AM
Old 03-31-2010
Ajuda Urgente Trabalho Sockets

Boa tarde galera,tenho conhecimentos básicos sobre sockets mas preciso algo mais avançado para resolver meu trabalho.vou passar a descrição dele aqui, espero que me ajudem.muito Obrigado!!
Esse projeto trata-se de uma aplicação distribuída onde um servidor tem a capacidade de solicitar aos
clientes a ele conectados a execução de uma aplicação.
O servidor deve oferecer um “console” que permita ao administrador executar os seguintes comandos:
· List: Mostra todos os clientes conectados ao servidor.
· Execute <cliente> <aplicação>: Envia uma requisição ao <cliente> para que ele execute a
<aplicação>. O <cliente> é identificado por seu endereço IP e a <aplicação> pelo seu endereço
no sistema de arquivos do <cliente>.
· Show <cliente>: Mostra ao usuário todos os processos (requisitados pelo servidor) que estão
em execução no <cliente>. Para cada processo listado devem ser apresentados os percentuais
de uso de memória e CPU como também o PID (process ID) do processo.
· Kill <cliente> <pid>: Finaliza a execução do processo identificado por <pid> no <cliente>.
Características de Implementação
O servidor deve ser implementado de maneira que quando os comandos Execute e Kill forem
executados, a comunicação (síncrona) entre cliente e servidor ocorra por meio de uma conexão TCP/IP.
Quando um comando Execute for executado por um cliente é preciso que seja feito uso da primitiva
fork() para carregar o processo desejado. Após isso, deve ser retornado ao servidor o PID desse novo
processo. Em uma requisição Kill o cliente deve finalizar a execução do processo identificado, também por
meio da primitiva apropriada para tal função (veja exemplo no aula-rede). Deve ser retornada ao servidor
uma mensagem identificando o sucesso ou falha na execução.
As aplicações clientes devem enviar periodicamente para o servidor uma mensagem assíncrona
(utilizando o protocolo UDP/IP) referente a cada processo executado por meio de requisição do usuário. Essa
mensagem deve conter os percentuais de uso de CPU e memória do processo. Dessa forma, quando o usuário
executar o comando “Show <cliente>” todas essas informações já estarão no servidor, dispensando a
comunicação com o cliente.
Com o objetivo de garantir o correto processamento dos dados é preciso realizar a criação de um
protocolo de aplicação (conforme visto em sala de aula) para realizar o tratamento do stream de dados do
protocolo TCP.

---------- Post updated 03-31-10 at 06:42 AM ---------- Previous update was 03-30-10 at 03:33 PM ----------

Good afternoon guys, I have basic knowledge about sockets but I need something more advanced trabalho.vou going to solve my description of it here, I hope you ajudem.muito Thanks!
This project it is a distributed application where a server has the ability to ask
customers connected to it to run an application.
The server must offer a "console" that allows the administrator to run the following commands:
> List: Shows all clients connected to the server.
· Perform <cliente> <application>: Sends a request to <cliente> for it to execute the
<application>. The <cliente> is identified by its IP address and the address <application>
the file system <cliente>.
<cliente> First show: Tell the user all processes (required by the server) that are
running on <cliente>. For each process listed the percentages should be presented
memory usage and CPU as well as the PID (process ID) of the process.
· Kill <cliente> <pid>: Terminate the execution of the process identified by the <pid> <cliente>.
Characteristics of Implementation
The server must be implemented so that when the commands are Run and Kill
executed, the communication (synchronous) between client and server occurs through a TCP / IP.
When a Run command is executed by a client it needs to be made use of primitive
fork () to load the desired process. After that, it should be returned to this new server PID
process. In a requisition Kill the customer must finalize the implementation of the identified process, also
through the primitive appropriate for this function (see example in-class network). Should be returned to the server
a message identifying the success or failure to perform.
The client application must periodically send a message to the server asynchronously
(Using UDP / IP) for each process performed by user request. That
message shall contain the percentage of CPU usage and memory process. Thus, when the user
run the command "Show <cliente>" all this information will already be on the server, eliminating the
communication with the customer.
Aiming to ensure the correct processing of data must be undertaken to establish a
application protocol (as seen in the classroom) to accomplish the processing of stream data
TCP protocol.
 

10 More Discussions You Might Find Interesting

1. Programming

Socket Programming

Dear Reader, Is there any way to check up socket status other than 'netstatus ' Thanks in advance, (1 Reply)
Discussion started by: joseph_shibu
1 Replies

2. Programming

Socket Programming socket

Hello, I actually try to make client-server program. I'm using SCO OpenServer Release 5.0.0 and when I try to compile my code (by TELNET) I've got this error : I'm just using this simple code : and I get the same error if I use : If someone can help me, Thanks (2 Replies)
Discussion started by: soshell
2 Replies

3. Programming

Need Help Regarding Socket Programming

Can anyone plz me. I need a sample code for the following description. Its urgent. It is C/Socket program with the following descriptions: NAME coreadServer - Concurrent Readers Server. coreadClient - Concurrent Readers Client. SYNOPSIS coreadServer <OutputFile> coreadClient <n>... (1 Reply)
Discussion started by: priya.vmr
1 Replies

4. IP Networking

socket programming

my system is a stand alone system... i want to try doing socket porgramming..ihave heard that this is usually done during testing... how can i do that....? (6 Replies)
Discussion started by: damn_bkb
6 Replies

5. IP Networking

socket programming

Hello Everyone Iam working on tcp/ip programming.with some time interval server has to send data.client has to close the connection and to open the connection between the time interval.this is the scenario when iam closing the connection in client side the connection terminates.how to... (1 Reply)
Discussion started by: sureshvaikuntam
1 Replies

6. Programming

help regarding socket programming

i m using sockets for setting up a connection between a server and a client. When the clients gets connected to the server, its ip is conveyed to the server through one of the predefined structures in c library... i save this ip address in an array....1st client's ip address goes to the zeroth... (1 Reply)
Discussion started by: abmxla007
1 Replies

7. UNIX for Advanced & Expert Users

socket programming

can we send udp message to a destination ip address .. without having an ip address configured in our machine using recvfrom ? (2 Replies)
Discussion started by: Gopi Krishna P
2 Replies

8. Programming

Help with socket programming in C

hi guys i got this code trying to make connection between the server and multi clients but when i do ./server i got message server waiting then when i run ./client it says client 1 nosuch file i dont know whats that should i use any argument plz help how to compile and run and whats the expected... (1 Reply)
Discussion started by: kedah160
1 Replies

9. Programming

Socket programming

Hi everyone, I'm new to this forum. I'm working on new project for last few days and this forum already helped me on couple of occasions. I don't have any prior experience with network programming so I'll appreciate any advise given. I'm trying to do the following: 1. open user... (2 Replies)
Discussion started by: _thomas
2 Replies

10. Programming

socket programming

how to include socket.h in visual studio 2005.. (2 Replies)
Discussion started by: asd123
2 Replies
All times are GMT -4. The time now is 05:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy