I went to a computer store and the salesman sold me a SATA cable and told me that all SATA cables are the same. Another salesman at a different store told me a cable rated for SATA 2, which I bought, MIGHT work as well as one rate for SATA 3 but it is not guaranteed. I decided to run a speed test on my SSD drive to check the results.
I can verify from dmesg and /var/log/messages analysis that I am connected a 6.0gbps. Are my results consistent with that type of connection?
i purchased, what was labeled as a 4-port fast ethernet sbus card from ebay.
i installed it in my ultra1, and it seems to be working fine. how can i determine if the card is infact a fast ethernet card vs. the standard ethernet 4-port card? (7 Replies)
I am trying to find a command to return the "link" speed of the networks installed on AIX.
ifconfig - gives me where the link is up and the duplex setting. I need to determine for example if the ethernet connection is 10, 100, 1000 Mbs or what the current speed is based on the network media... (3 Replies)
Hello,
I have a Supermicro server with a P4SCI mother board running Debian Sarge 3.1. This is the "dmidecode" output related to RAM info:
RAM speed information is incomplete.. "Current Speed: Unknown", is there anyway/soft to get the speed of installed RAM modules? thanks!!
Regards :)... (0 Replies)
Hi guys
I have a bunch of x4100's x4140's etc with solaris 10 update4 running on them but I suspect that when a lot of these boxes were originally built, the jumpstart process used an update2 miniroot, now as far as i understand it, the miniroot used at jumpstart is the miniroot that stays on... (1 Reply)
I analysed disk performance with blktrace and get some data:
read:
8,3 4 2141 2.882115217 3342 Q R 195732187 + 32
8,3 4 2142 2.882116411 3342 G R 195732187 + 32
8,3 4 2144 2.882117647 3342 I R 195732187 + 32
8,3 4 2145 ... (1 Reply)
Hello
I've got a server with multiple NICS. In a script I want to log the outbound interface. Is there an easy way I can do this so that the output looks something like this:
host(xxx.xxx.xxx.xxx): Opening connection to ...
Obviously, getting the host is simple with hostname. But how... (4 Replies)
Being a novice user to linux i m little unaware of how would i check disk read write speed.
One of my mate is suggesting to create a file using dd command and check how much time it takes to create a 30 gb file .
I think this has a little sense however i would also like to take your reviews... (5 Replies)
Hello all,
I have a question about what you think the best practice is to determine what region you are running on when you have a system setup with a DEV/TEST, QA, and PROD regions running the same scripts in all.
So, when you run in DEV, you have a different directory structure, and you... (4 Replies)
Discussion started by: Rediranch
4 Replies
LEARN ABOUT PHP
microtime
MICROTIME(3) 1 MICROTIME(3)microtime - Return current Unix timestamp with microsecondsSYNOPSIS
mixed microtime ([bool $get_as_float = false])
DESCRIPTION microtime(3) returns the current Unix timestamp with microseconds. This function is only available on operating systems that support the
gettimeofday() system call.
PARAMETERS
o $get_as_float
- If used and set to TRUE, microtime(3) will return a float instead of a string, as described in the return values section below.
RETURN VALUES
By default, microtime(3) returns a string in the form "msec sec", where sec is the number of seconds since the Unix epoch (0:00:00 January
1,1970 GMT), and msec measures microseconds that have elapsed since sec and is also expressed in seconds.
If $get_as_float is set to TRUE, then microtime(3) returns a float, which represents the current time in seconds since the Unix epoch
accurate to the nearest microsecond.
EXAMPLES
Example #1
Timing script execution with microtime(3)
<?php
/**
* Simple function to replicate PHP 5 behaviour
*/
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();
// Sleep for a while
usleep(100);
$time_end = microtime_float();
$time = $time_end - $time_start;
echo "Did nothing in $time seconds
";
?>
Example #2
Timing script execution in PHP 5
<?php
$time_start = microtime(true);
// Sleep for a while
usleep(100);
$time_end = microtime(true);
$time = $time_end - $time_start;
echo "Did nothing in $time seconds
";
?>
Example #3
microtime(3) and REQUEST_TIME_FLOAT (as of PHP 5.4.0)
<?php
// Randomize sleeping time
usleep(mt_rand(100, 10000));
// As of PHP 5.4.0, REQUEST_TIME_FLOAT is available in the $_SERVER superglobal array.
// It contains the timestamp of the start of the request with microsecond precision.
$time = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"];
echo "Did nothing in $time seconds
";
?>
SEE ALSO time(3).
PHP Documentation Group MICROTIME(3)