Answer #10: benjamin@benjamin-VirtualBox:~$ telnet localhost 11211 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. add test1 0 60 2 10 STORED add test2 0 60 5 hello STORED add test 0 60 8 good buy STORED quit Connection closed by foreign host. benjamin@benjamin-VirtualBox:~$ time memccat --server localhost test1 10 real 0m0.014s user 0m0.000s sys 0m0.008s benjamin@benjamin-VirtualBox:~$ time memccat --server localhost test2 hello real 0m0.013s user 0m0.000s sys 0m0.012s benjamin@benjamin-VirtualBox:~$ time memccat --server localhost test good buy real 0m0.015s user 0m0.000s sys 0m0.012s benjamin@benjamin-VirtualBox:~$ benjamin@benjamin-VirtualBox:~$ benjamin@benjamin-VirtualBox:~$ time memccat --server localhost test1 memcat: test1 not found real 0m0.005s user 0m0.004s sys 0m0.000s benjamin@benjamin-VirtualBox:~$ time memccat --server localhost test2 memcat: test2 not found real 0m0.009s user 0m0.000s sys 0m0.004s benjamin@benjamin-VirtualBox:~$ time memccat --server localhost test memcat: test not found real 0m0.008s user 0m0.000s sys 0m0.004s benjamin@benjamin-VirtualBox:~$ --------------------------------------------------------------------- Answer 11: for ((i=2500; i<=2599; i++)); do echo $i >> user$i; done memccat --server localhost user2500 user2000 user2533 user2599 user3000 --------------------------------------------------------------------- Answer 12: Steps to make memcached server available over the network: * Edit memcached config file: sudo vim /etc/memcached.conf * Change listing ip address from 127.0.0.0 (localhost) to the ip address of my VirtualMachine (192.168.1.15 - Brigied Connection). * Restart memcached server: sudo service memcached restart * telnet to memcached server via telnet from client machine: telnet 192.168.1.15 11211 benjamin@benjamin-VirtualBox:/var/www$ benjamin@benjamin-VirtualBox:/var/www$ sudo vim /etc/memcached.conf [sudo] password for benjamin: 32 # Specify which IP address to listen on. The default is to listen on all IP addresses 33 # This parameter is one of the only security measures that memcached has, so make sure 34 # it's listening on a firewalled interface. 35 -l 192.168.1.15 #-l 127.0.0.1 (localhost) benjamin@benjamin-VirtualBox:/var/www$ sudo service memcached restart Restarting memcached: memcached. benjamin@benjamin-VirtualBox:/var/www$ New Client Machine: [benjamin@FedoraXPS ~]$ telnet 192.168.1.15 11211 Trying 192.168.1.15... Connected to 192.168.1.15. Escape character is '^]'. get nettest VALUE nettest 0 5 hello END Question #6 benjamin@benjamin-VirtualBox:/var/www$ time lynx -dump localhost/mc.php FirstName: Memory LastName: Cache Age: 100 Retrieved from the Database real 0m0.038s user 0m0.004s sys 0m0.020s benjamin@benjamin-VirtualBox:/var/www$ benjamin@benjamin-VirtualBox:/var/www$ time lynx -dump localhost/mc.php FirstName: Memory LastName: Cache Age: 100 Retrieved From Cache real 0m0.028s user 0m0.000s sys 0m0.020s benjamin@benjamin-VirtualBox:/var/www$ Question #8 --Query One: SELECT * FROM books where publisher='wrox'; benjamin@benjamin-VirtualBox:/var/www$ time lynx -dump localhost/mc.php title: Beginning XML author: David Hunter publisher: Wrox topic: XML comment: Well recommended, fairly comprehensive price: 39.99 Retrieved from the Database real 0m0.028s user 0m0.000s sys 0m0.020s benjamin@benjamin-VirtualBox:/var/www$ time lynx -dump localhost/mc.php title: Beginning XML author: David Hunter publisher: Wrox topic: XML comment: Well recommended, fairly comprehensive price: 39.99 Retrieved From Cache real 0m0.028s user 0m0.000s sys 0m0.020s benjamin@benjamin-VirtualBox:/var/www$ --Query Two: SELECT * FROM books where publisher='Addison Wesley'; benjamin@benjamin-VirtualBox:/var/www$ time lynx -dump localhost/mc.php title: The Java Programming Language author: Ken Arnold publisher: Addison Wesley topic: Java comment: Considered to be from the source price: 37.95 Retrieved from the Database real 0m0.029s user 0m0.004s sys 0m0.016s benjamin@benjamin-VirtualBox:/var/www$ time lynx -dump localhost/mc.php title: The Java Programming Language author: Ken Arnold publisher: Addison Wesley topic: Java comment: Considered to be from the source price: 37.95 Retrieved From Cache real 0m0.022s user 0m0.008s sys 0m0.008s benjamin@benjamin-VirtualBox:/var/www$ --Query Three: SELECT * FROM books where title='Thinking in Java' benjamin@benjamin-VirtualBox:/var/www$ time lynx -dump localhost/mc.php title: Thinking in Java author: Bruce Eckel publisher: Prentice Hall topic: Java comment: Well written, free on the web price: 0 Retrieved from the Database real 0m0.027s user 0m0.008s sys 0m0.012s benjamin@benjamin-VirtualBox:/var/www$ benjamin@benjamin-VirtualBox:/var/www$ benjamin@benjamin-VirtualBox:/var/www$ benjamin@benjamin-VirtualBox:/var/www$ time lynx -dump localhost/mc.php title: Thinking in Java author: Bruce Eckel publisher: Prentice Hall topic: Java comment: Well written, free on the web price: 0 Retrieved From Cache real 0m0.014s user 0m0.004s sys 0m0.012s benjamin@benjamin-VirtualBox:/var/www$ --Query Four: SELECT * FROM books where title='Programming Perl' benjamin@benjamin-VirtualBox:/var/www$ benjamin@benjamin-VirtualBox:/var/www$ time lynx -dump localhost/mc.php title: Programming Perl author: Larry Wall publisher: O'Reilly topic: Perl comment: Usually considered THE reference price: 44.95 Retrieved from the Database real 0m0.025s user 0m0.008s sys 0m0.008s benjamin@benjamin-VirtualBox:/var/www$ time lynx -dump localhost/mc.php title: Programming Perl author: Larry Wall publisher: O'Reilly topic: Perl comment: Usually considered THE reference price: 44.95 Retrieved From Cache real 0m0.013s user 0m0.008s sys 0m0.000s benjamin@benjamin-VirtualBox:/var/www$ --Query Five: SELECT * FROM books where title='Learning Perl' benjamin@benjamin-VirtualBox:/var/www$ benjamin@benjamin-VirtualBox:/var/www$ time lynx -dump localhost/mc.php title: Learning Perl author: Randal Schwartz publisher: O'Reilly topic: Perl comment: Not a bad start price: 29.95 Retrieved from the Database real 0m0.022s user 0m0.008s sys 0m0.004s benjamin@benjamin-VirtualBox:/var/www$ benjamin@benjamin-VirtualBox:/var/www$ time lynx -dump localhost/mc.php title: Learning Perl author: Randal Schwartz publisher: O'Reilly topic: Perl comment: Not a bad start price: 29.95 Retrieved From Cache real 0m0.018s user 0m0.004s sys 0m0.004s benjamin@benjamin-VirtualBox:/var/www$