Friday, March 8, 2019

windows - Why do I have less memory with 32 bit OS






I have a brand new machine at work, i7 quad core with 8GB of ram. Mainly, I use it to develop JAVA applications using Eclipse.


I have to choose an operating system. Unfortunately, it has to be a flavor of Windows, and it has to be 32 bit in order to connect to my company's network.


I've been told that if I install Windows 7 32bit, that I will loose the use of some of the RAM and that instead of 8GB, I will effectively have about 4GB.


2 Questions:
Is this true - will Windows 7, 32 bit OS give me less RAM to use?


Is there any flavor of 32 bit Windows that will let me have the use of 8GB of RAM.


If I had a choice I would probably take 8GB running Windows XP over 4GB running Windows 7.


Answer



There's a great table here on Wikipedia showing the maximum addressable physical memory for various versions of Windows.


First of all, a 32-bit OS using PAE can use more than 4GB of RAM. Second, yes, it appears true that no version of 32-bit Windows 7 has this feature enabled.


The good news is that there are 32-bit versions of MS Windows which support more than 4GB of RAM. The bad news is that they don't tend to be aimed at consumers, so I hope your company will buy them for you! They are:



  • Windows 2000 Advanced Server (8 GB) or Datacenter (32 GB)

  • Windows Server 2003 Enterprise Edition (16 GB), R2 Enterprise Edition (64 GB), R2 Datacenter (128 GB), or Datacenter Edition (16 GB)

  • Windows Server 2008 Enterprise, Datacenter (64 GB)


windows 7 - Overcoming the 1024 character limit with setx



I am trying to set environment variables using the setx command, such as follows




setx PATH "f:\common tools\git\bin;f:\common
tools\python\app;f:\common tools\python\app\scripts;f:\common
tools\ruby\bin;f:\masm32\bin;F:\Borland\BCC55\Bin;%PATH%"





However, I get the following error if the value is more then 1024 characters long:




WARNING: The data being saved is truncated to 1024 characters.



SUCCESS: Specified value was saved.




But some of the paths in the end are not saved in variable, I guess due to character limit as the error suggests.


Answer




Your best bet is to edit the registry directly.



Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment and edit the Path value (then reboot to activate the new value).



Note however that while you can enter a very long path, (up to the maximum environment variable length; 2,048 or 32,768 bytes depending on the source), not all software will be able to read and handle it correctly if it is too long.


windows - Does "Mount volume as removable medium" reduce the chances of data corruption with a TrueCrypt encrypted USB hard drive?


I have an external USB hard drive plugged in to my laptop some of the time. The external drive is whole drive encrypted using TrueCrypt.


I always check "Mount volume as removable medium" in the hope that it will offer better data corruption protection from accidental disconnection of the external drive. However, according to the TrueCrypt manual:



Mount volume as removable medium


Check this option, for example, if you
need to prevent Windows from
automatically creating the 'Recycled'
and/or 'System Volume Information'
folders on the volume (these folders
are used by the Recycle Bin and System
Restore facilities).



I don't mind these folders being created, so are there any other advantages in selecting "Mount volume as removable medium"?


My reason behind this questions is that I would like to mount it as a non-removable drive so I can add some its contents to my Windows 7 libraries (which don't support removable drives).


Answer



That corruption may happen if you disconnect your drive before all of the data was written. TrueCrypt acts as a middleman, encrypting/decrypting data on the fly as it is read/written. It does not affect the way your OS or programs write to the disk.


So, if some program write()s a lot of data without flush()ing, and you disconnect that external hard drive, some data may be not fully written at that moment. But it has nothing to do with TrueCrypt.


If windows, or the program you are using doesn't treat removable media in some special way, then there is no difference how you mount that drive (beyond those pesky folders).


ubuntu - How to tell which process is hogging my CPU when they don't add up to 100%?

Ubuntu's System Monitor applet shows 100% CPU usage continuously. If I click it, the resources tab shows it at 100% continuously, too. If I go to processes, though, to find out which process is the culprit, there is nothing above 10%. If I run top there is nothing above 10%. The individual processes do not add up to 100%. I try killing lots of processes, but the overall usage continues to be 100%. How can I find out what's hogging the CPU?



alt text




This is an unusual situation on a computer I use daily, which is never anywhere near 100% CPU unless I'm doing something that requires it (like loading 32 Firefox tabs), after which it goes back to a normal idle level. It's not a new install or anything. There is no reason the processor should be maxed out. I'm not sure when it started or if I changed something that caused it to happen.



Normally I would use top or System Monitor and find the process that had gone out of control, but I can't find anything with those tools this time. It persists after reboots and everything.



And the processor is obviously hot, so it's not an erroneous reading.



Update: I tried killing every process, one at a time, until the problem went away, and killing vino-server finally fixed it, even though that process never went above 5%. I had enabled Remote Desktop a few days ago (and have obviously now disabled it).



But the question remains: How did a single process manage to use 100% CPU while top only showed that process at 5%? How do I identify culprits like this in the future?




Looks like I'm not the only one who's had this problem:




Still a problem in both jaunty &
karmic. Interestingly, both System
Monitor & htop do not show the sum of
individual processes being anywhere
near 100% cpu.


Thursday, March 7, 2019

maintenance - HDD maintanance. minimal power on of external hard drive (for backup)

I want to use a external hard drive (not ssd) for backup. however I have heard that because of the mechanical nature of a HDD, it needs to be powered on and spin regularly to maximize its lifespan.


The question is: If I want to optimise the lifespan of the drive, what is the longest time I can leave it turned off and still keep it "healthy"


I plan to keep off site, and visit it every 6 month. But fear that is to long.


EDIT


@karen pointed to some very good information. -thanks


In how-much-time-until-an-unused-hard-drive-loses-its-data the minimal recomendation for is



Depending on the priority of the data you've stored, you may want to refresh the hard disk more often. If it is essential data, I would recommend no less then 2 years at maximum. If you can withstand some chance of minor data loss (e.g. a few corrupted sectors here and there), go with 5 years.



This is nice to know and show that my 6 month revisit plan is fine. However I am wondering what would be best frequency to optimise the drives lifespan.

windows update - SQL Server 2008 R2 service pack 1 not showing



I've checked my SQL server version and it says "Microsoft SQL Server Management Studio 10.50.1600.1". I've seen here that there's a SP1 for it. Why doesn't windows update offer me to d/l it?
Should I d/l it manually?



Answer



For some strange reason, the next time I've tried to force a check for updates, 29 updates appeared, including the wanted one.


linux - How to check that all files in a file system are can be read without errors?



I'm using an external hard drive with an ext4 file system to make backups. The backup software I use (faubackup) copies the file hierarchy 1:1 into a timestamp-named folder on the hard drive, and makes incremental backups in such a way that it hardlinks new copies of files whose contents have not changed to the same file in the corresponding subfolder of the previous backup. Since I recently had a backup drive die on me, I now want to make sure that all the files written can actually be read without I/O error, so I know I can rely on my backup.



One way to do so would be to read the whole partition, e.g. by dd'ing it to /dev/null. However, the disk is 3TB large, and doing so would take about 7 hours (via USB 3.0).




Another way would be to use e2fsck with the -c option, but this also takes ages.



I'm thinking it should be possible to speed the process up by not checking the whole disk, but only the files, which is only a fraction of the whole disk size. This could be done e.g. by writing all files to a tar archive which is not written to disk, but sent to /dev/null. Here the problem is the hard linking: If I have say 10 incremental backups, the storage for that is again just a fraction of the disk, but it appears to be about 10 times larger than that.



My question: Is there a way to read only the files on the disk, and only one in each set of files hard linking to the same storage space? Or is there a way to make e2fsck -c or something similar only check the used parts of the file system (allocated blocks)?


Answer



GNU tar does not copy the content of hard linked files multiple times. Read the first answer to this question or the official documentation on this topic. You can test this by piping the output (the archive) of tar through wc: tar cf - -C . | wc -c and verify the archive size in bytes (you can compare this to the result with the tar option --hard-dereference).


hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...