Tag: operating system
Guidelines to Development on the Hollywood Operating System
by Steve Hernandez on Nov.05, 2009, under General, Technology
Courtesy of Cain’s Brain.
1. Any PERMISSION DENIED has an OVERRIDE function.
2. Complex calculations and loading of huge amounts of data will be accomplished in under three seconds. In the movies, modems transmit data at two gigabytes per second.
3. When the power plant/missile site/whatever overheats, all the control panels will explode, as will the entire building.
4. If you display a file on the screen and someone deletes the file, it also disappears from the screen. There are no ways to copy a backup file — and there are no undelete utilities.
Corollary: Deleting a file instantly removes all copies of said file from disks, memory, frame buffers and caches across all computers in the universe.
5. If a disk has got encrypted files, you are automatically asked for a password when you try to access it.
6. No matter what kind of computer disk it is, it’ll be readable by any system you put it into. All application software is usable by all computer platforms.
7. The more high-tech the equipment, the more buttons it has. However, everyone must have been highly trained, because the buttons aren’t labeled.
8. Most computers, no matter how small, have reality-defying three-dimensional, real-time, photo-realistic animated graphics capability.
9. Laptops, for some strange reason, always seem to have amazing real-time video phone capabilities and the performance of a CRAY.
10. Whenever a character looks at a terminal, the image is so bright that it projects itself onto his/her face.
11. Computers never crash during key, high-intensity activities. Humans operating computers never make mistakes under stress.
12. (From Independence Day) No matter what kind of virus it is, any computer can be infected with it — even an alien spaceship’s computer — simply by running a virus upload program on a laptop.
13. (From Jurassic Park) A custom system with millions of lines of code controlling a multimillion dollar theme park can be operated by a 13 year old who has seen a Unix system before. Seeing an operating system means you know how to run any application on that system, even custom apps.
Note: What OS was it really running?
(1) “These are super computers”. A CrayOS?
(2) “Quicktime movie, Apple logo, trash can.” MacOS?
(3) “Reboot. System ready. C:\” DOS?
(4) “Hey, this is Unix. I know this” Unix?
The computers in Jurassic Park were Cray supercomputers running the MacOS as a graphical shell of DOS all layered on top of a Unix base.
14. You cannot stop a destructive program or virus by unplugging the computer. Presumably the virus has it’s own built-in power supply.
15. You cannot stop a destructive program downloading onto your system by unplugging the phone line. You must figure out the mandatory “back door” all evil virus programmers put in.
16. Computers only crash if a virus or a hacker is involved.
17. All text must be at least 72 point.
18. Word processors do not have an insert point.
19. The only way to reboot is to shut off the main power to the building.
20. Passwords can be guessed in three and exactly three tries. If you cannot guess the password in three tries, you must give up immediately.
21. Any task or program can be executed by simply pressing Enter, no matter which program or window is in the foreground.
22. All scanners, video cameras and digital cameras have a resolution of approximately 500 megapixels. Any image can be infinitely magnified with no pixelization.
23. Security will not improve over time. Nonaffialiated personnel can take over a space ship without needing an account or access control. Corollary: Anyone can override access control lists in the future.
24. All hackers wear black T-shirts or Hawaiian shirts.
25. Incoming messages are displayed letter by letter. Email over the Internet works like telegraphs.
26. Microsoft Windows doesn’t exist. Macintosh has a 75% market share.
27. GUI operations, such as image selection and manipulation, can be handled easily and quickly via the keyboard.
28. If a robot’s eyes turn red, it becomes evil.
29. Cell phones and laptops have infinite battery life, until you need to call for help.
30. Latency does not exist. Voice and data can be sent to Mars in real time.
Goodbye Plaxo
by Steve Hernandez on Jul.30, 2009, under Personal
12 days ago I recieved a notification from Plaxo stating that the SYNC feature of the application was going to be turned into a “Premium Feature”. My question is, what’s not a premium feature? The SYNC was literally the only reason I had that application installed. Mind you, I’ve been using Plaxo for at least 5 years and rely on it to sync my desktop and laptop computers, to then sync with my Windows Mobile phone. If you take SYNC away… and I can back up own PST’s up (I do weekly), then why exactly would I pay?
I wouldn’t. And I hope you don’t either.
I am now setting up Google Calendar Sync. I can easily have my Desktop computer save my information to Google, and my Laptop download from Google. And for how much? You guessed it, for free. Not that “free for a short while” free, but free-free.
Good bye Plaxo. Hopefully you’ll die a quite death… I think you will, you’ve already picked out your coffin with that move.
My name is SteveOH, and I’m a former Plaxo user of 5 years.
Cannot upload large files into SharePoint v3
by Steve Hernandez on Jul.04, 2009, under Technology
1. Use Notepad to open the Web application Web.config file. By default, this file is in the following folder:
C:\Inetpub\Wwwroot\Wss\VirtualDirectories\ VirtualDirectoryFolder
2. Add the following section at the end of the web.config file in the respective site:
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength=”1073741824“/>
</requestFiltering>
</security>
</system.webServer>
Where the number is in bytes. This amount would allow you to upload 1024 MB (1 GB) and was calculated as follows (1024 B / KB * 1024 KB / MB * 1024 MB / GB).
Note This code sets the value of the maxAllowedContentLength property to 52428800. Therefore, the maximum file size of an uploaded file is 52428800 bytes. However, set the value of this property so that it is larger than the file that you are trying to upload. Also, set the value of this property so that it is larger than the maximum file upload size that you have configured in SharePoint. If you do not, users will not receive an error message that they are exceeding the size limit if they try to upload a file that is larger than the maximum file upload size that you have configured in SharePoint.
Intel Matrix RAID 5 – Rebuild on Reboot
by Steve Hernandez on May.14, 2009, under Technology
So I finally figured out what was causing my RAID 5 on my Windows Server 2008 box to always rebuild on reboot. For a little background, since I am currently not offering any services to any clients that require the server to remain powered up 24 hours a day, I shut her down for about 6 to 8 hours in the evening (while I sleep, she sleeps). Every morning I start her back up, and she would rebuild the Array. BUT WHY!? It was a graceful shutdown. The logs showed nothing out of the ordinary. So I started to poke around to see what was going on.
To my amazement, the Windows Search indexer was the problem. This cranky service would not shutdown gracefully, and would actually be in the middle of a write to disk right before the system killed it. So I tried to remove the RAID from indexing… but that didn’t help. After looking I found that I had actually set the indexer to save the index on the array, which would have given the array an excuse to rebuild: indexer closed improperly and did not close the index files correctly.
My solution was to remove the array from the indexer’s allowed paths (do not index the array – I’ll wait the extra 10 seconds to find anything that I’m looking for) and I moved the index files to the system drive (yes it may cause minor performance degredation and maybe wear on the system drive, but not nearly as much as a 6 hour RAID rebuild EVERY DAY!).
I have been rebooting for the past 4 days with no issues.
Microsoft Windows Server 2008 – Disk is Read-Only / Write Protected
by Steve Hernandez on May.13, 2009, under Technology
I recently installed a new hard drive into my server running Server 2008. Everything worked fine, until I rebooted. I tried to copy a file to the disk and recieved an error that the drive, in my case E:, was write protected. I don’t know how or why that happened, but the solution is fairly simple. The steps are as follows:
- Open a command prompt (ie. Start > Run > cmd) with administrative privledges
- Type in the command: diskpart
- Run the command: list disk
- Look for the disk number that’s having the problem. In my case I have a system drive, a RAID 5 configuration (1 logical drive) and then the new drive, so it was DISK 2. I will continue to use it in the example but note that yours may differ.
- Select the disk using the following command: sel disk 2
- Enter the following command: ATTRIBUTES DISK CLEAR READONLY
- Exit diskpart with the command: exit
Then test by copying a file or folder to the drive. It should be fairly instantaneous, but worst case you may have to reboot (I did not, however).
That’s about it. It would be interesting to know WHY this happened, but then again, does it really matter?
Good luck.
How to Fix Windows Server 2008 Boot Loader
by Steve Hernandez on Mar.29, 2009, under Technology
If the boot loader to your Windows Server 2008 machine gets corrupted or deleted for whatever reason, it really is a painstaking process to get it fixed. The boot loader to my machine got deleted somehow while I was resizing partitions. After scouring the web, I could not find anything on rebuilding the boot loader for Windows Server 2008. All I could find were instructions to restore a Windows Vista boot loader, but luckily, the process for Server 2008 is similar.
If you are getting a “bootmgr is missing” error upon startup or something similar, repairing the boot loader will probably fix the problem.
Due to the lack of recovery tools on the Server 2008 installation CD, the boot loader must be rebuilt manually.
For this guide, I’m going to assume your installation has a drive letter of C:.
Insert the Server 2008 installation CD into your DVD-ROM. Restart your computer and boot from the CD.
Choose to repair your computer, then open the command prompt.
At the command prompt, use the following commands:
c:
cd boot
bootsect /nt60 c: /force /mbr
bootrec /rebuildbcd
After using the “bootrec /rebuldbcd” command, you will be prompted to accept a Windows installation. Accept the installation, then wait for the process to finish. Once it’s done, reboot your comptuer and you should have a boot loader ready to go.
Ubuntu / Vista Dual Boot – Full Encryption with TrueCrypt
by Steve Hernandez on Mar.12, 2009, under Technology
sda1: Windows Vista encrypted with TrueCrypt
sda2: Ubuntu Hardy Heron /boot partition (not encrypted)
sda3: Ubuntu Hardy Heron encrypted volume with LVM inside and / and swap partions within LVM (to save partitions used overall incase it gets over 5 partitions)
sda4: Working on installing OSX Leopard on this partition currently.
The steps I used are as follows, in brief:
1) Installed Vista first (actually pre-installed on laptop)
2) Installed Ubuntu second using encrypted physical volume with LVM inside it and 2 partions / and swap inside the LVM(at this point, grub was in the MBR)
3) Ran full windows system encryption (not full disk encryption) through TrueCrypt and let it write its bootloader to the MBR. (obviously overwriting Grub in the MBR)
4) Booted with a live cd and copied the truecrypt bootloader from the MBR to a file in the /boot partition (sda2)
use these commands to do so:
dd if=/dev/sda of=/mnt/boot/truecrypt.mbr count=1 bs=512
dd if=/dev/sda of=/mnt/boot/truecrypt.backup count=8 bs=32256
5)Reinstalled grub to the MBR using these commands:
sudo grub
install (hd0,1)/grub/stage1 (hd0) (hd0,1)/grub/stage2 0×8000 p
6) Added a chainloader to the menu.lst Vista entry to point to the truecrypt bootloader within the /boot partition like so:
title Windows Vista/Longhorn
rootnoverify (hd0,0)
makeactive
chainloader (hd0,1)/truecrypt.mbr
boot
The only partition not encrypted in the /boot partition so far, which is fine. After grub loads, no matter which OS I choose, I enter a passphrase and that OS starts.
For more detailed instructions which I pulled from but which are for XP instead of Vista, use this link:
NAS / Software and Hardware RAID Performance Benchmarking
by Steve Hernandez on Feb.15, 2009, under Technology
I recently came across an application provided by Intel for the purpose of benchmarking NAS devices (Define: Network Attached Storage). I’ve been looking for a solution to benchmark the new RAID-5 array I created on my Windows Server 2008 server (I love the RAID’s redundancy, but the write speeds are quite low). I wanted to get a better idea of its performance, as Windows will report 250 – 150 MB READS and 20 – 50 MB WRITES, which is considerably poor considering the 4 drives are individually benchmarked at ~100 MB READS and 60 MB WRITES (They are Western Digital Caviar Blues / RE3 / RE16).
The software can be found here or from Intel here.
System Specifications:
Operating System: Microsoft Windows 2008 Enterprise Edition, SP1
CPU Type: Pentium 4 630, 3000 MHz w/ Hyperthreading
Motherboard Name: Dell Dimension 8400
Motherboard Chipset: Intel Alderwood i925XE
Motherboard Frontside Bus Speed: 800 MHz
System Memory (RAM): 4 GB, Dual Channel
System Memory Speed / Timings: DDR2-533 (266 MHz) / 4-4-4-12
Hard Drive Controller Interface: SATA I (1.5 Gbits / s) = 150 MB/s (maximum)
Hard Drives: Western Digital
- Drive #1 – WDC WD5002ABYS-01B1B (465 GB)
- Drive #2 – WDC WD5002ABYS-01B1B (465 GB)
- Drive #3 – WDC WD5000AAKS-00A7B (465 GB)
- Drive #4 – WDC WD5000AAKS-00A7B (465 GB)
- Drive #5 – WDC WD800BB-00JHC0 (74 GB) – SYSTEM
Raid Configuration: Software 4 disk RAID-5 (4 x 500GB, 1.36 TB Effective Storage Space)
System Memory Benchmark: Copy – 4790 MB/s, Read – 6266 MB/s, Write – 3341 MB/s, Latency – 92.7 ns
System Processor Benchmark: CPU ZLib – 10592 KB/s, CPU AES – 3055
Benchmarks completed using Everest Ultimate Edition v4.20.1257
All drives are SATA II (3.0 GB/s) but are running in backwards-capability mode.
The primary roles of the server is to serve files and store backups (File Server) and web and application development and website hosting (Web Server). I do not stream media, play music from the server or write extremely large amounts of data that are time sensitive. Therefore, my decision for RAID-5 was based on the space savings (n – 1) storage availability and the redundancy by means of the parity. I am willing to give up performance (write and read) for storage space and redundancy, but I want to know how much I’m actually giving up.
Tests
- HD Video Playback, 2x HD Video Playback, 3x HD Video Playback, 4x HD Video Playback
These benchmarks examine the behavior of the NAS unit while (simultaneously) playing one or more HD video files at 720p using Windows Media Player. Intel gives a percentage rate for the sequential reading of data in these tests, which lies at 99.5% for the HD Video Playback Test. With 2x HD Video Playback, it lies at 18.1%. The result is 6.6% with 3x HD Video Playback and 9.6 % with 4x HD Video Playback.
- HD Video Record
This test writes an HD Video file in 720p format to the NAS unit. This test is made of up of mostly sequentially transferred data.
- HD Video Playback & Recording
HD Video Play & Record examines the behavior of the NAS unit when simultaneously reading and writing an HD Video file in the 720p format. The sequentially-transferred data in this test is approximately 18% of the test.
- HD 2x Playback 2x Record
This benchmark is similar to the one above, but the proportion of sequential file operations is 3%.
- HD Playback With Office
This metric measures the data transfer rates when an HD Video file is read from the NAS unit while working with the Office applications. This test is made up of 608 files. The proportion of sequential file operations is 53.2%.
- HD Playback With Backup
Like the previous test, but this time an HD Video file is played while simultaneously carrying out a backup on the NAS unit.
- Content Creation
This benchmark is made up of 95% write operations to the NAS unit. This simulates the creation of files on the NAS unit such as is the case when, for example, using video editing programs.
- File Copy To NAS / File Copy From NAS
These tests determine the data transfer rate when copying files to or from the NAS unit. In both of these test processes, a 4 GB file is copied. Unlike with Backup / Restore, 64 KB is read and written.
- Directory Copy From NAS / Directory Copy To NAS
Similar to the previous test, files are copied to and from the NAS unit. A total of 126 files with a total size of approximately 188 MB are written and read across the network.
- Photo Album
This test determines how the NAS unit handles the supply of a multitude of small files—for example, viewing digital photographs stored on the NAS unit. It simulates the viewing of a total of 169 photographs with an overall size of approximately 1.2 GB.
Considerations and Assumptions
These tests were conducted on the Server, not over the network, which will probably result in very high throughput. I did this to get a feel for the actual performance, not that felt over the wire, and because I’m currently running 100 Mbps (Cat 5e) on my LAN, not gigabit. Thus, I did not want the network to be the bottleneck in these tests, as it would be saturated and skew the results.
I ran the tests 6 times, in each, manipulating the environment to establish a real world benchmark. Since this benchmark is done via an application, it will compete with other processes for resources. Additionally, it will compete with the actual Operating System who is responsible for transfering the data to the disk and calculating the parity for the raid (which is quite memory and CPU intensive). For test 6 I ran the system in Safe Mode, utilizing only necessary processes and services to run the operating system (Safe Mode without Networking). Thus, the numbers are quite high. In the others, I ran Outlook, SQL, browsed the internet and downloading files via torrents (to the actual RAID, so this will mess with the numbers as well) – not all at the same time, of course, except for test 4.
Results
| Test | 1 | 2 | 3 | 4 | 5 | 6 | Avg MB/s |
| HDVideo_1Play | 267.789 | 267.789 | 80.364 | 54.54 | 59.134 | 274.603 | 167.37 |
| HDVideo_2Play | 223.736 | 223.736 | 68.638 | 44.619 | 75.123 | 223.204 | 143.18 |
| HDVideo_4Play | 177.201 | 177.201 | 70.222 | 54.731 | 73.009 | 180.005 | 122.06 |
| HDVideo_1Record | 626.098 | 626.098 | 651.41 | 618.888 | 678.788 | 732.636 | 655.65 |
| HDVideo_1Play_1Record | 82.744 | 82.744 | 85.224 | 71.802 | 79.058 | 155.986 | 92.93 |
| ContentCreation | 6.199 | 6.199 | 5.983 | 5.628 | 6.141 | 6.022 | 6.03 |
| OfficeProductivity | 25.383 | 25.383 | 25.474 | 20.958 | 26.249 | 27.955 | 25.23 |
| FileCopyToNAS | 633.475 | 633.475 | 748.91 | 690.827 | 768.598 | 806.578 | 713.64 |
| FileCopyFromNAS | 147.096 | 147.096 | 79.675 | 57.42 | 80.561 | 151.573 | 110.57 |
| DirectoryCopyToNAS | 65.156 | 65.156 | 25.13 | 18.384 | 23.418 | 81.739 | 46.50 |
| DirectoryCopyFromNAS | 44.048 | 44.048 | 20.412 | 15.53 | 20.929 | 47.274 | 32.04 |
| PhotoAlbum | 27.748 | 27.748 | 26.411 | 19.508 | 28.171 | 29.204 | 26.47 |

Discussion
I attribute the absurd file copy speeds to caching and buffering at both the OS, RAID and the Drive level, as well as the writes for the video recording. All in all, I’m pleased with the benchmarks and am satisfied with the set up. One thing to note is that the tests were done from the SYSTEM drive to the RAID, and thus, the SYSTEM drive introduced an additional bottleneck as the transfers from it to the RAID were going to be quite slow (the drive is benchmarked at ~56MB READ and ~30 WRITE).
ASP.NET ServerVariable Collection
by Steve Hernandez on Jan.21, 2009, under Technology
Syntax
Request.ServerVariables (server_variable) |
| Parameter | Description |
|---|---|
| server_variable | Required. The name of the server variable to retrieve |
Server Variables
| Variable | Description |
|---|---|
| ALL_HTTP | Returns all HTTP headers sent by the client. Always prefixed with HTTP_ and capitalized |
| ALL_RAW | Returns all headers in raw form |
| APPL_MD_PATH | Returns the meta base path for the application for the ISAPI DLL |
| APPL_PHYSICAL_PATH | Returns the physical path corresponding to the meta base path |
| AUTH_PASSWORD | Returns the value entered in the client’s authentication dialog |
| AUTH_TYPE | The authentication method that the server uses to validate users |
| AUTH_USER | Returns the raw authenticated user name |
| CERT_COOKIE | Returns the unique ID for client certificate as a string |
| CERT_FLAGS | bit0 is set to 1 if the client certificate is present and bit1 is set to 1 if the cCertification authority of the client certificate is not valid |
| CERT_ISSUER | Returns the issuer field of the client certificate |
| CERT_KEYSIZE | Returns the number of bits in Secure Sockets Layer connection key size |
| CERT_SECRETKEYSIZE | Returns the number of bits in server certificate private key |
| CERT_SERIALNUMBER | Returns the serial number field of the client certificate |
| CERT_SERVER_ISSUER | Returns the issuer field of the server certificate |
| CERT_SERVER_SUBJECT | Returns the subject field of the server certificate |
| CERT_SUBJECT | Returns the subject field of the client certificate |
| CONTENT_LENGTH | Returns the length of the content as sent by the client |
| CONTENT_TYPE | Returns the data type of the content |
| GATEWAY_INTERFACE | Returns the revision of the CGI specification used by the server |
| HTTP_<HeaderName> | Returns the value stored in the header HeaderName |
| HTTP_ACCEPT | Returns the value of the Accept header |
| HTTP_ACCEPT_LANGUAGE | Returns a string describing the language to use for displaying content |
| HTTP_COOKIE | Returns the cookie string included with the request |
| HTTP_REFERER | Returns a string containing the URL of the page that referred the request to the current page using an <a> tag. If the page is redirected, HTTP_REFERER is empty |
| HTTP_USER_AGENT | Returns a string describing the browser that sent the request |
| HTTPS | Returns ON if the request came in through secure channel or OFF if the request came in through a non-secure channel |
| HTTPS_KEYSIZE | Returns the number of bits in Secure Sockets Layer connection key size |
| HTTPS_SECRETKEYSIZE | Returns the number of bits in server certificate private key |
| HTTPS_SERVER_ISSUER | Returns the issuer field of the server certificate |
| HTTPS_SERVER_SUBJECT | Returns the subject field of the server certificate |
| INSTANCE_ID | The ID for the IIS instance in text format |
| INSTANCE_META_PATH | The meta base path for the instance of IIS that responds to the request |
| LOCAL_ADDR | Returns the server address on which the request came in |
| LOGON_USER | Returns the Windows account that the user is logged into |
| PATH_INFO | Returns extra path information as given by the client |
| PATH_TRANSLATED | A translated version of PATH_INFO that takes the path and performs any necessary virtual-to-physical mapping |
| QUERY_STRING | Returns the query information stored in the string following the question mark (?) in the HTTP request |
| REMOTE_ADDR | Returns the IP address of the remote host making the request |
| REMOTE_HOST | Returns the name of the host making the request |
| REMOTE_USER | Returns an unmapped user-name string sent in by the user |
| REQUEST_METHOD | Returns the method used to make the request |
| SCRIPT_NAME | Returns a virtual path to the script being executed |
| SERVER_NAME | Returns the server’s host name, DNS alias, or IP address as it would appear in self-referencing URLs |
| SERVER_PORT | Returns the port number to which the request was sent |
| SERVER_PORT_SECURE | Returns a string that contains 0 or 1. If the request is being handled on the secure port, it will be 1. Otherwise, it will be 0 |
| SERVER_PROTOCOL | Returns the name and revision of the request information protocol |
| SERVER_SOFTWARE | Returns the name and version of the server software that answers the request and runs the gateway |
| URL | Returns the base portion of the URL |
Changing your hosts file in Vista
by Steve Hernandez on Dec.04, 2008, under Technology
By default, if you try to modify your hosts file in Vista, it will not let you save it. It tells you that you don’t have permission. To successfully modify the hosts file, run notepad.exe as an administrator and open the file.
1) Browse to Start -> All Programs -> Accessories
2) Right click “Notepad” and select “Run as administrator”
3) Click “Continue” on the UAC prompt
4) Click File -> Open
5) Browse to “C:\Windows\System32\Drivers\etc”
6) Change the file filter drop down box from “Text Documents (*.txt)” to “All Files (*.*)”
7) Select “hosts” and click “Open”
8) Make the needed changes and close Notepad. Save when prompted.