unix performance with php


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers unix performance with php
# 1  
Old 08-24-2007
unix performance with php

I'm not quite if this is a unix problem or something to do with php.

What's working:
ok what I've done so far is a php script that logs onto the unix server (AIX4.3) and sends the topas command, then echo's the result back onto the webbrowser.

What's not working:
i want to get the value next to idle but dont quite know how i can do that. and also the value does not display on the output (image 2). any one know y that is?

an alternative could be a different command that displays a similar thing?

Thanks

Mark



image 1
image 2


PHP Code:
<?php  
    $username
='root';
    
$password='sibi123';

    
$header1=(    
                
chr(0xFF).chr(0xFB).chr(0x1F).chr(0xFF).chr(0xFB).chr(0x20).chr(0xFF).chr(0xFB).chr(0x18).chr(0xFF).chr(0xFB).chr(0x27).chr(0xFF).chr(0xFD).chr(0x01).
                
chr(0xFF).chr(0xFB).chr(0x03).chr(0xFF).chr(0xFD).chr(0x03).chr(0xFF).chr(0xFC).chr(0x23).chr(0xFF).chr(0xFC).chr(0x24).chr(0xFF).chr(0xFA).chr(0x1F).chr(0x00).chr(0x50).
                
chr(0x00).chr(0x18).chr(0xFF).chr(0xF0).chr(0xFF).chr(0xFA).chr(0x20).chr(0x00).chr(0x33).chr(0x38).chr(0x34).chr(0x30).chr(0x30).chr(0x2C).chr(0x33).chr(0x38).chr(0x34).
                
chr(0x30).chr(0x30).chr(0xFF).chr(0xF0).chr(0xFF).chr(0xFA).chr(0x27).chr(0x00).chr(0xFF).chr(0xF0).chr(0xFF).chr(0xFA).chr(0x18).chr(0x00).chr(0x58).chr(0x54).chr(0x45).
                
chr(0x52).chr(0x4D).chr(0xFF).chr(0xF0)
            ); 
    
    
$header2=(    
                
chr(0xFF).chr(0xFC).chr(0x01).chr(0xFF).chr(0xFC).chr(0x22).chr(0xFF).chr(0xFE).chr(0x05).chr(0xFF).chr(0xFC).chr(0x21)
            );
    
    
$fp=pfsockopen("172.19.1.38",23); 
    
    
fputs($fp,$header1); 
    
sleep(1); 
    
fputs($fp,$header2); 
    
sleep(1); 
    
    
fputs($fp,"$username\r"); 
    
sleep(1); 
    
fputs($fp,"$password\r"); 
    
sleep(1); 
    
fputs($fp,"\r"); 
    
sleep(3); 
    
fputs($fp,"\r"); 
    
sleep(3); 
    
fputs($fp,"q \r"); 
    
sleep(3); 
    
fputs($fp,"topas \r"); 
    
sleep(1); 
    
    
$output=fread($fp,128); 
    
$stat=socket_get_status($fp); 
    
$output.=fread($fp$stat["unread_bytes"]); 
    
    
$output explode("\n"$output); 
    unset(
$output['0']); 
    
$output implode("\n"$output); 
    
    
$output str_replace("\n""<br>"$output); 
    echo 
$output
    
fclose($fp); 
?>
image 1
image 2
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Best performance UNIX just for HOST Virtualization?

Hi everybody, Which Unix base OS have best performance for HOST virtualization? I tested SmartOS but it needs another OS to connect remotely! Thanks in advance. (11 Replies)
Discussion started by: mbzadegan
11 Replies

2. UNIX for Dummies Questions & Answers

Unix Performance testing - training content

Hi Everyone, My company is involved in performing performance testing and now they want to perform couple of training related with executing those tests on the servers based on Unix sytems. And I have to provide them draft of the content for those trainings. I think this kind of training... (2 Replies)
Discussion started by: Bartuss
2 Replies

3. UNIX for Dummies Questions & Answers

performance of unix server

Hi, I am supposed to run few jobs based on the usage of unix server. How to find out if the server is too busy. what are the commands we can use to find out that. Thanks (1 Reply)
Discussion started by: dnat
1 Replies

4. Linux

Linux/Unix performance monitoring

This is my first post (yes I'm a newbie).... :D I'm looking for a list of Linux and Unix commands for performance monitoring and a good sight or area on this site that would have man pages and or information on those commands..... Thanks if anyone can take the time to post..... :cool: (14 Replies)
Discussion started by: harrisjl
14 Replies

5. UNIX for Dummies Questions & Answers

Unix Performance Monitoring

In the vmstat , there are many columns you can see. Can someone tell me what is the most important column that i need to be watched on, and what value or average value should i watch inorder to determine that im experiencing a cpu bottle neck. What should be my basis. or if you use glance ... (2 Replies)
Discussion started by: kaibiganmi
2 Replies

6. UNIX for Dummies Questions & Answers

Unix performance monitoring counters

Which performance counters you might to define as "The most important counters in checking unix performance" (3 Replies)
Discussion started by: gen4ik
3 Replies

7. SCO

SCO unix server performance tuning

Hello, Can someone share his experience with SCO unix server performance tuning? - how to make some performance analysis - how to tune up a server for better performance Thank you! (0 Replies)
Discussion started by: forumuser7
0 Replies

8. SCO

SCO UNIX performance

Hi there, Our server is SCO UNIX 3.12 (ten years old). Recently, the system is so slow even there were only a few users logging on the system. Please advise me, Thank you so much, Trinh (1 Reply)
Discussion started by: trinhnguyen
1 Replies

9. UNIX for Dummies Questions & Answers

Unix performance monitoring via Windows/NT

We are trying to Monitor Unix via Window95/98 on an NT network. Is there anyone that could point us in the direction on software that runs in Windows on a Telnet connection that we could use to accomplish this? We have tried a program called Unix Watcher by Etasoft and can' get it to connect. ... (6 Replies)
Discussion started by: btrout
6 Replies
Login or Register to Ask a Question