Saturday, October 31, 2015

windows xp - How can I recover my Transcend pendrive when both the used space and free space are 0 bytes?

I have an Transcend pendrive, and when I connect it and double click it to explore, it is showing the error:



Please insert a disk into drive



Also In the properties field it is showing



File system- Unknown
Used space- 0 bytes
free space- 0 bytes
capacity- 0 bytes



I tried to format it using using the command prompt but it is not showing in the list disk command. It is also not showing in the Disk Management.

motherboard - computer not starting at all after connecting sata drive

I built a "new" computer using my old i5-4590K processor (socket 1150). The motherboard is Asus H81M-K, new board , with 4 sata ports (2xSATA6GB + 2xSATA3GB). I have assembled my own computers since year 2000, also I am not an expert.


All was working fine for 24 hrs with the following components:



  • 2 corsair XMS3 DDR3 1600MHz 8Go RAM = 16 Go

  • i5 4590K (not overclocked)

  • asus nvidia 1050Ti 4GB

  • coolermaster 450W PSU

  • SSD Samsung EVO 840 512Go (on SATA-6GB port 1)

  • DVD-Bluray player LG (on SATA-3GB port 1)


Then after turning off, unplugging power, I connected:



  • HDD Western digital caviar blue 1TB on sata-6GB port2 - drive almost new.

  • HDD Western digital caviar green 2TB on sata-3GB port2 - drive used for backup only.


Then:



  • the computer didn't start, just the green led on the motherboard apppears. No fan, no noise.

  • If I remove the two hard-drives, same thing.

  • I tested another PSU: a new cougar 600W VTE600 PSU. Same problem. I tested the old PSU connecting green wire with ground and the PSU working fine too. So, it's not a PSU problem.

  • I made a clear CMOS and removed/put the battery in place. The battery has 3.1V.

  • I removed all components (graphic card, use only one RAM module, removed all drives), same thing.

  • I put the motherboard outside of the case on an insulating material, only with CPU, cooler and RAM. I bridged the startup pin with a screwdriver, nothing start or move. Only the green light on the motherboard is on.

  • I tested both hard drives with an external dock on my laptop and they work normal.


Any idea? dead motherboard upon connecting sata drives? how is it possible?

microsoft excel - How do I turn on Autosave in Office 365 applications?



For all my Powerpoint presentations and Excel workbooks (but not Word documents) on the Windows 10 version of Office 365, I have a little badge "AutoSave Off" in the corner.



AutoSave Off



This occurs is there whether I just created a new file or am working on a previously saved one.



I assume this means that the files aren't autosaving. If that's accurate how do I turn autosave on?


Answer




That Autosave icon in the Office 365 refers only to saving to shared/internet locations, such as OneDrive. If you save locally, it can still do automatic recovery saves, but it's not the same thing as this function.



Mousing over the button shows the following tool tip:
enter image description here



Going to File -> Options -> Save still has the following options:
enter image description here


nslookup - PowerDNS authoritative name server works but non-authoritative name server servfail

In my current role as Devops I have been assigned a few tasks that are new to me including setting up a PDNS server with MySQL backend. After initial setup of the server I tested responses from the new PDNS server with DIG and NSLOOKUP while specifying the ip of my server. All responses came back positively as I was hoping they would.



After initial setup I waited for some time to allow the records time to be updated on other non-authoritative name servers. Unfortunately the records do not appear to be noticed by other name servers out there. Every attempt to do a normal NSLOOKUP or DIG on any of my domains resulted in a SERVFAIL from non-authoritative name servers.




I apologize for my ignorance of the DNS system. I have been doing some research and have tried multiple times to change some settings to get things to work properly, but unfortunately all changes I have made have been unsuccessful.



I am hoping that someone can help me understand a little more about how a non-authoritative name server gets record information from an authoritative name server. I think I understand properly how a domain name is found from the TLD down to the individual server, but I am not sure why my name servers are not being found. They appear to be responding properly when queried directly.



I am running:



CentOS
pdns 3.3.1
pdns-backend-mysql




I have my SOA record set to point to my primary name server:




SOA Record Example



commissionconverter.com
origin = ns3.myebiz.com
mail addr = hostmaster.myebiz.com
serial = 2014030401
refresh = 28800

retry = 7200
expire = 604800
minimum = 86400




thank you for your help.

Removing or disabling Chrome’s Task Manager with a batch-file

I am trying to find a way to either disable or completely remove Chrome’s Task Manager.


My proposed solution involves using a batch-file running in the background to detect if the Chrome Task Manager is open, and shut down Chrome if it is. Unfortunately, I do not know batch programming and am low on time for this problem to be solved.


Here’s a couple of ideas I had for this:



  • This command detects how many instances of Chrome are running:


    tasklist /nh /fi "imagename eq chrome.exe" | find /i "chrome.exe" >nul && (wmic process where name="chrome.exe" | find "chrome.exe" /c


  • This command kills all Chrome processes:


    taskkill /im chrome.exe



This does not work because Chrome does not create a new process when the Task Manager is opened, though it does create a new window. (There is no change in the Processes tab of the Windows Task Manager, but there is one in the Tasks tab.)


I will settle for a program that shuts down Chrome if it detects two windows of it open, even partial solutions are welcome at this point.

memory - What does "32GB(8Gbx4DR)" mean in the dumped RAM info?



I dumped my RAM DIMM info. It contains string like 32GB(8Gbx4DR). I know its size is 32GB. What does 8Gbx4DR mean?




And I heard about the concepts like rank, channel, bank. I understand that a rank is the chips that make up the bit width required by the memory controller channel. And rank is made of banks. But how can I map the dumped info to these concepts?



Below is the screenshot of the dumped info:



enter image description here




  • This is a server board.

  • Each CPU has 2 memory controllers.


  • Each memory controller has 3 channels.

  • Each channel can support 2 slots of DIMM.



ADD 1



Some reference pages and documents I reviewed regarding RAM setups:






ADD 2



And back to my 32GB(8Gbx4DR) question. Now I believe I can figure it out:




  • 1 DRAM chip = 8Gb (lower b) (According to the spec)

  • DDR* requires 64-bit channel width. and x4 means a single DRAM chip provides 4-bit width. So 16 DRAM chips are required per RANK to meet the channel width.

  • DR means 2/dual ranks per DIMM




So the total size of a DIMM = 2 * 16 * 8Gb = 32GB (upper B)



ADD 3



And if include the ECC (Error Correcting Code), there needs more DRAM chips. For a single byte, a single ECC bit is needed.



For example, with 8Gb x4 DRAM chip, the calculation for a 16GB dual-rank DIMM with ECC is like this. (The important thing is to calculate based on bits.)



The DDR* requires 64-bit width for a rank to serve a channel. And x4 means a single DRAM chip has 4-bit width. So a rank will comprise 64/4 = 16 chips.




With dual ranks, we need 32 DRAM chips.



To achieve a total DIMM capacity of 16GB, the size of each DRAM chips should be 16GB /32 = 16*8 Gb /32 = 4 Gb.



Each 8 bits need a ECC bit, so 16GB needs: 16*8 Gb /8 = 16Gb. ECC can be implemented with DRAM chips as well. And 16Gb is just 4 pieces of 4-Gb DRAM chips.



So in total, we need 32 + 4 = 36 4Gbx4 DRAM chips.


Answer



The x4DR fits within the techspecs and probably Points to the dualrank "feature" of this particular RAM:




enter image description here


centos - How to extend an ext4 partition and filesystem?



I have a 400GB disk with a 320GB ext4 partition.
I would like to grow the ext4 partition to use the left space (80GB of free space).




+--------------------------------+--------+
| ext4 | Free |
+--------------------------------+--------+


How could I do this?



I've seen people using resize2fs but I don't understand if it resizes the partition.



Another solution would be to use fdisk but I don't want to delete my partition and loose data. How could I simply grow the partition without loosing any file?




Note: I'm talking about an un-mounted data partition without LVM and I have backups, but I'd like to avoid spending some time on recovery.


Answer



You must begin with the partition unmounted. If you can't unmount it (e.g. it's your root partition or something else the system needs to run), use something like System Rescue CD instead.




  1. Run parted, or gparted if you prefer a GUI, and resize the partition to use the extra space. I prefer gparted as it gives you a nice graphical representation, very similar to the one you've drawn in your question.


  2. resize2fs /dev/whatever


  3. e2fsck /dev/whatever (just to find out whether you are on the safe side)


  4. Remount your partition.





While I've never seen this fail, do back up your data first!


windows 10 - Is it safe to edit the global PATH environment variable?


I just recently found out that I couldn't run mysql without typing out the whole path or being in the correct directory--unless I added the path to the PATH environment variable.


I managed to do so and now I'm able to run mysql upon start-up of my command line. I'm lazy and didn't want to type out the whole path just to run mysql from cmd. Also, I didn't know of any other way to do it. I randomly came across the solution on a forum.


The only thing I'm wondering now is if this is OK/safe to do for all of my programs.


While it isn't practical, it's just a precaution.


I noticed that in some tutorials online, some people had a PATH variable for their user variable while I didn't. I only found the PATH environment variable in the system variables section. Is that a bad thing?


The only account on my PC is the administrator account. At least, that's the only account I use.


Can I get some clarity/input on this?


Answer



There's usually nothing dangerous about adding directories to PATH. It could only cause you problems in two ways:



  1. While using a command prompt, you might accidentally run a program you didn't intend to. Then again, if you know the programs you put on your PATH, nothing malicious will happen.

  2. Programs might find DLLs there that usually aren't loaded. The DLL search order specifies that if a requested DLL can't be found in normal locations, it will finally be looked for in the PATH places. If, say, a program optionally loaded a module by trying to load a DLL by name and not caring if it fails, someone with control of a PATH folder could cause that program to load an arbitrary DLL if one with its name isn't found earlier in the search. Incidentally, that possible security issue is why it's a bad idea to attempt to load DLLs that may or may not be present. Well-written programs won't have this problem.


You could also conceivably max out the PATH variable length, but that's not really a security issue.


Concerning your not finding the user PATH variable: if you create a per-user version of that variable, your effective PATH will be the system one automatically combined with your per-user one.


mac osx - Automatically starting svnserve on Snow Leopard

I have installed Subversion onto my iMac running Snow Leopard, but am having trouble getting svnserve to start up automatically. As I understand it (I'm still fairly green with OSX), the best way to do that is to utilize launchd. To that end, I have created the following .plist file in the /Library/LaunchDaemons folder. If I use launchctl to execute this file, svnserve starts as expected, but it doesn't automatically start when the system starts up or I log in.








Disabled

Label
org.tigris.subversion.svnserve
UserName
Dave
ProgramArguments


/opt/subversion/bin/svnserve
--inetd
--root=/Users/Shared/SVNrep

ServiceDescription
Subversion Standalone Server
Sockets

Listeners



SockFamily
IPv4
SockServiceName
svn
SockType
stream



SockFamily
IPv6
SockServiceName
svn
SockType
stream



inetdCompatibility


Wait






If anyone here could provide any suggestions as to how to get this to work, I'd really appreciate it.

nginx - connect() failed (111: Connection refused) while connecting to upstream



I'm experiencing 502 Gateway errors when accessing a PHP file in a directory (http://example.com/dev/index.php). The logs simply says this:



2011/09/30 23:47:54 [error] 31160#0: *35 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xx.xx.xx, server: domain.com, request: "GET /dev/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "domain.com"


I've never experienced this before. What is the solution for this type of 502 Gateway error?



This is the nginx.conf:




user www-data;
worker_processes 4;
pid /var/run/nginx.pid;

events {
worker_connections 768;
# multi_accept on;
}


http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;

types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##

# Logging Settings
##

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

##
# Gzip Settings
##


gzip on;
gzip_disable "msie6";

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;


##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}

Answer



It sounds like you haven't started and configured the backend for Nginx. Start php-fpm and add the following to nginx.conf, in the http context:




server {
listen 127.0.0.1;
server_name localhost;

error_log /var/log/nginx/localhost.error_log info;

root /var/www/localhost/htdocs;

location ~ \.php$ {

fastcgi_pass 127.0.0.1:9000;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

fastcgi_intercept_errors on;
error_page 404 /error/404.php;
}
}

Create a Windows 7 System Repair ISO?



According to the Microsoft website I can run "Create a system repair disc" from the start menu to burn a recovery Disc. However, there are many situations (including not having a disk drive) where this cannot be done.



My goal is to create a bootable USB drive according to this guide but their method to do so without burning a physical disc includes downloading an ISO from "somebody's" website. I don't know who "somebody" is and I feel it is reasonable to not boot something I can't verify as being untampered with. To the best of my knowledge, Microsoft does not host a recovery disc ISO for download as this would be the easiest solution.



So my problem is that I'd like to circumvent Microsofts "burn to disc" option with a "burn to ISO" through any reasonable means.


Answer



You can download an official ISO from Microsoft's digital distributor, Digital River. Using the Windows 7 USB tool, available from Microsoft here, you can make a bootable install USB drive that will allow you to access the recovery tools. No disc-burning required.




Make sure you select the correct ISO for the Windows you are attempting to repair. You can also reinstall from the USB stick, but you will need your own product key that should have come with your computer.


Can Windows XP remember file icon position?

Windows allows you to arrange icons however you like in a window. However after some time when I go back to the window, it has forgotten the icon positions and has completely rearranged the icons. Is there a way to preserve the icon positions?



In the previous version of Windows I used, this would happen on rare occasions (about 6 months) and it might only move a couple of icons. Now it is happening practically every day and it is every single icon. Attempts to rearrange them manually are futile and it is increasingly maddening.



Searching Google, I have found a number of programs that allow you to save and restore icon position on the desktop. But, this is just a regular folder window so I am not sure if any of those would even work.



Some details:





  • Windows XP SP 3 running in Parallels 5 virtual machine

  • Auto Arrange and Align to Grid are NOT turned on

  • Fresh OS install and only setting icon positions in one window

Friday, October 30, 2015

Windows 2008 R2 DHCP Overlapping Scopes

We are trying to troubleshoot a scope overlap problem. We have multiple device types we wish to give all different ranges of a 16 bit subnet. IE. X device we wish to give 192.168.2.1-192.168.2.254/16, Y devices we wish to give 192.168.3.1-192.168.3.254/16. We are trying to accomplish this by creating different scopes and using the 60 class identifier. The problem is DHCP won't allow us to give these scopes with 16 bit masks because of the potential overlap. We aren't overlapping the address pool so why does DHCP care and can we work around this?



If this isn't possible, how can i assign specific ranges by device type without creating multiple scopes?




Any thoughts would be helpful.



UPDATE:



Entire Scope is 192.168.0.0/16
Gateway is 192.168.1.1/16
Device Hardware A - 192.168.20.1-192.168.20.254/16
Device Hardware B - 192.168.26.1-192.168.26.254/16
Device Hardware C - 192.168.85.1-192.168.85.254/16

We tried to setup multiple scopes for each device type (A,B,C) but couldn't specify a 16 bit mask as Scope A could technically overlap Scope B even thought our start and end addresses don't.



I hope this makes more sense.

Thanks for your thoughts.

browser - How to replace web page source "on the fly"?


I'm looking for way to replace web page content on the way. What I mean is:



  1. I need to set some pattern for web page: where&what html source code to replace

  2. Load this webpage and look at the result.


For example, to change background color on the website by my own.


I know, there exist a some possible ways to do it like develop Chrome extensions which can have permissions to do this things, also I have find already built that extensions but it didnt working out and out of date.


So maybe you know methods to do it?


Or maybe there is exist way to call Javascript functions or run JS script on the working page (not saved).


Answer



There are a number of possible approaches for this:



  • A browser extension that intercepts the page and allows you to insert your own elements (including scripts). Greasemonkey is the most popular for JavaScript.

  • A proxy application that runs on your PC and incercepts traffic between your browser and the Internet. Examples include Fiddler (cross-platform) and Charles Proxy for Mac.

  • Inserting code manually using the browser's web development tools (press F12 to show them), you might need some addin's to enhance the tools to allow you to mess with the CSS/HTML/JS.


windows server 2008 - Set environment variables from command line - and make them stick globally






In Windows 2008 Server R2, once I set an environment variable in the command line, how can I make it stick?
For example, it's easy to write:



set path=%path%;



much easier than the crummy right-click My Computer method. But once I set this, the changes disappear with my command window. How to make them stick? I want to do the same with JAVA_HOME and some others as well.


Answer



As mentioned in more detail in How do I set PATH and other environment variables?, you can use setx to set a variable permanently:


setx MyVariable "C:\Path\to\Folder"
setx JAVA_HOME "C:\Path\to\Java"

et cetera.


blocking - How can I block all incoming and outgoing traffic in Windows 7 except Teamviewer?

I'm trying to figure how I can block all incoming and outgoing traffic except Teamviewer?
I've been trying to achieve this with the Windows 7 firewall but with no success.


Anybody any ideas?

Is there a way to protect SSD from corruption due to power loss?



We have a group of consumer terminals that have Linux, a local web server, and PostgreSQL installed. We are getting field reports of machines with problems and upon investigation it seems as if there was a power outage and now there is something wrong with the disk.



I had assumed the problem would just be with the database getting corrupted, or files with recent changes getting scrambled, but there are other odd reports.




  • files with the wrong permissions

  • files that have become directories (for example, index.php is now a directory)

  • directories that have become files


  • files with scrambled data



There are problems with the database getting corrupted, but that's something I could expect. What I'm more surprised about is the more basic file system problems - for example, permissions or changing a file into directory. The problems are also happening in files that did not recently change (for example, the software code and configuration).



Is this "normal" for SSD corruption? Originally we thought it was happening on some cheap SSDs, but we have this happening on a name-brand (consumer grade.)



FWIW, we are not doing autofsck on unclean boot (don't know why- I'm new). We have UPSs installed in some locations, but sometimes it's not done properly, etc. This should be fixed, but even then people can power-down the terminal uncleanly, etc. - so it's not fool-proof. The filesystem is ext4.



The question: is there is anything we can do to mitigate the problem at the system-level?




I found some articles referring to turning off the hardware cache or mounting the drive in sync mode, but I'm not sure if that would help in this case (metadata corruption and non-recent changes). I also read a reference about mounting the filesystem in read-only mode. We can't do that because we need to write, but we could make a read-only partition for the code and configuration if that would help.



This is an example of a drive sudo hdparm -i /dev/sda1:



Model=KINGSTON RBU-SMS151S364GG, FwRev=S9FM02.5, SerialNo=
Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=125045424

IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
AdvancedPM=yes: disabled (255) WriteCache=enabled
Drive conforms to: Unspecified: ATA/ATAPI-3,4,5,6,7

Answer



When suddenly losing power, MLC/TLC/QLC SSDs have two failure modes:





  • they lose the in-flight and in-DRAM-only writes;

  • they can corrupt any data-at-rest stored in the lower page of the NAND cell being programmed.



The first failure condition is obvious: without power protection, any data which are not on stable storage (ie: NAND itself) but on volatile cache only (DRAM) will be lost. The same happens with classical mechanical disks (and that alone can wreak havoc on filesystem which does not properly issue fsyncs).



The second failure condition is a MLC+ SSDs affair: when reprogramming the high page bit for storing new data, an unexpected power loss can destroy/alter the lower bit (ie: previous committed data) also.



The only true, and most obvious, solution is to integrate a power-loss-protected DRAM cache (generally using battery/supercaps), as done since forever by high-end RAID controllers; this, however, increase drive cost/price. Consumer drives typically have no power-loss-protected caches; rather, they use an array of more economical solutions as:





  • partially protected write cache (ie: Crucial M500/M550/M600+);

  • NAND changes journal (ie: Samsung drives, see SMART PoR attribute);

  • special SLC/pseudo-SLC NAND regions to absorbe new writes without previous data at risk (ie: Sandisk, Samsung, etc).



Back to your question: your Kingstone drives are ultra-cheap ones, using unspecified controller and basically no public specs. It does not surprise me that a sudden power loss corrupted previous data. Unfortunately, even disabling the disk's DRAM cache (with the massive performance loss it commands) will not solve your problem, as previous data (ie: data-at-rest) can, and will, be corrupted by unexptected power losses. If they are based on the old Sandforce controller, even a total drive brick can be expected under the "right" circumstances.



I strongly suggest to review your UPS and, in the mid-term, to replace these aging drives.




A last note about PostgreSQL and other Linux databases: they will not disable the disk's cache and should not be exptected to do that. Rather, they isses periodic/required fsyncs/FUAs to commit key data to stable storage. This is the way things should be done unless a very compelling reason exists (ie: a drive which lies about ATA FLUSHES/FUAs).



EDIT: if possible, consider migrating to a checksumming filesystem as ZFS or BTRFS. At the very least consider XFS, which has journal checksum and, lately, even metadata checksum. If you are forced to use EXT4, consider enabling auto-fsck at startup (fsck.ext4 is very good at repair corruption).


macos - Can't delete a directory in Mac

We have a bundle App.component and inside it we have a 'Contents' directory with the following permissions:


 drwxrwxrwx  4 root  wheel  136 Mar 18 15:05 Contents

When I try to delete this directory using


rm -rf Contents

It fails with the reason


rm: Contents//MacOS/APP: Permission denied
rm: Contents//MacOS: Directory not empty
rm: Contents//Resources/App.rsrc: Permission denied
rm: Contents//Resources: Directory not empty
rm: Contents/: Permission denied

lsof shows that there are no processes that are using this bundle
and running stat Contents/Resources/App.rsrc outputs:


234881026 3691189 -rw-r--r-- 1 root wheel 0 733 "Mar 18 16:10:13 2012" "Mar  8 17:00:18 2012" "Mar 18 15:04:39 2012" "Mar  8 17:00:18 2012" 4096 8 0 Contents/Resources/App.rsrc

We do have permissions to delete the 'Contents' directory so why does it still fails?


Edit: If I move the bundle from /Library/Audio/Plug-Ins/Component to ~/tmp/ then It will delete the folder without any problems


Thank you

hard drive - Windows: How can I see disk space used over time?


I'm looking for a way to capture and visualize used disk space over time. All I need is one number-- bytes used on disk. I store a lot of photos on my computer, so I need a way to estimate when I'll need more hard drive space. If there's a way to capture used disk space with hourly resolution that would be great, but even daily resolution is fine. I don't even need a visualization of the data; as long as the data is easily exportable to Excel, I can create my own graph and extrapolate.


I've seen many disk space visualization programs like WinDirStat and TreeSizeFree, but they don't have a way to automate capturing disk space usage over time.


Answer



You can see used disk space over time with Windows Performance Monitor (perfmon) to the MB with down to one second resolution. This tool comes built into the latest versions of Windows so you don't even need to download another program to see the data. It doesn't show any previous data so you'll only see disk space data from when you set it up. I only needed hourly data points but I tested with updates every one second and it worked fine.


Perfmon allows you to output how much free disk space you have as values to a file that are comma-separated (can be opened in Excel), tab-separated (what Excel usually uses), or binary. Using the binary output, you can visualize the data in the perfmon itself. Using one of the other output types allows you to make your own graphs of the data in Excel.


Here's a step-by-step guide on how to set this up:



  1. Open Windows Performance Monitor (Win-R -> type "perfmon.exe" -> Enter)

  2. In the left-most pane, double click Data Collector Sets. Right click User Defined -> New -> Data Collector Set.

  3. Enter a name for your set, something like "Disk Space Free". Click the radio button Create manually (Advanced), click Next.

  4. Check Performance counter, click Next

  5. Click Add...

  6. Scroll until you see LogicalDisk and click the down arrow next to it. Scroll down a little and click Free Megabytes (you can also select % Free Space if desired). Now in the box below titled Instance of selected object: click C: and then below that Add >>. That counter should now show up in the right pane titled Added counters. Click OK.

  7. Set the Sample Interval to however often you'd like to have the data collected. Like I mentioned, I wanted to see hourly data points. So, I put 1 in Sample Interval and changed Units to Hours. Click Next.

  8. Select the location you'd like your logs to be located in. Click Finish.

  9. Double click User Defined in the left panel and click the data collector set you just created (the example name was "Disk Space Free").

  10. The data collector set you just created should show up in the right panel. Right click it -> Properties.

  11. Under Log format you can select the type you prefer according the explanation in the paragraph above. Click OK.


If you selected binary, you can view the data by clicking Reports -> User Defined -> Disk Space Free in the left pane, then double clicking the item in the right pane.


If you chose comma-separated or tab-separated, you can view you data at the location you specified in step 8.


windows - Where do the environment variables for an elevated cmd.exe process come from?

The environment variables shown by the SET command can be notably different depending on the
privilege level of the command prompt session. Moreover, it seems that any program run with
administrative credentials by the same user can create environment variables that will persist long after that process ends, and will be set in any subsequent elevated process
launched by that user (and ONLY in those elevated processes). I have not been able to find those variables in the Environment tab shown by Process Explorer for any process associated
with the user login session. My Question is: where are those values stored, and why is
Process Explorer unable to access them (of course, since Process Explorer runs elevated by
default those variables appear in its own Environment tab)? Or did I just overlook them?

environment variables - SystemRoot not substituted

I have a strange behavior with the environment variables at my Windows XP SP3.


When I logon as Administrator, the %SystemRoot% strings in PATH are substituted to C:\WINDOWS, the value of the variable 'SystemRoot' is C:\WINDOWS.


But when I logon as any non-admnistratove user, the %SystemRoot% literally remains in the PATH, although the variable SystemRoot has the same value as with Administrator's account.


As a workaround I added the missing directories to the users PATH variable. But I would like to know what causes this trouble and if this can be fixed. Both variables (SystemRoot and PATH) are defined in the non-user-specific "System Variables" set.

windows 7 - Half charged battery improves life time when adapter is used



On my Lenovo laptop, running windows 7, I got a prompt saying that, the system has noticed I am mainly using adapter, therefore I should keep the battery half charged. It justifies by saying, trying to overcharge batter reduces life time.



Now, form what I understand, the battery and charger should have internal circuits to prevent attempted over charging in the first place. Then, why is there a software level prompt to set the option to "half charge" battery, if mostly running on adapters.



Answer



The reason it's that way is because that's the way LiIon batteries work. Other battery types are happiest when fully charged, but not LiIon. I'm sure the laptop manufacturers would prefer otherwise, but you can't beat physics.



If you use the laptop on mains power most of the time, you should use one of the settings (if available on your unit) to charge only to 50-80%. Should you anticipate needing to use the laptop on battery for an extended period you can (in advance) change the setting and fully charge the unit.



One note: On my Sony Vaio the system sometimes "forgets" this setting, especially if the unit has been left on battery too long and runs the battery "flat". So check the setting from time to time.



Another note: Don't think you can do better by removing the battery entirely. Most laptops depend on the battery to supply "peak" power even when running on the adapter, and thus the CPU will likely be "throttled" if you remove the battery.


Wildcard records with Nginx to handle custom domains



Here's my 4, going on 5 hour problem:



I've set up a WordPress multisite instance that's going to be handling sites at domain.com, subdomain.domain.com and customdomain.com. There will be N number of sites using customdomain.com, so I'd prefer not creating records for each. On the server, I have Nginx in front of Apache.



What I'd like to do is set up a wildcard record in Nginx to handle all of the custom domains. Right now, it looks something like this:



server {
listen 80;

server_name _;
root /home/server_user/web/production;
client_max_body_size 50M;
client_body_buffer_size 128k;

location / {
access_log off;
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $proxy_host;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

}


With this setup, it will pass requests to Apache and serve the dynamic content but returns 404s for all of the static content. If I change 'server_name' to 'customdomain.com', Nginx starts serving static content again. When I change 'server_name' to '_' or any other catch-all pattern, Nginx falls on its face.



Any ideas?


Answer




The solution (at least with my configuration):



In your wildcard record, the 'listen' directive should also include 'default':



listen 80 default;


Don't add a 'server_name' directive because that will cause things to break in ugly, unexpected ways.



Props to Max Cutler for helping me figure this out.



boot - PC does not start from Windows 10 USB

I am trying to reinstall Windows 10 on an Asus X556LJ laptop, having replaced its failing HDD with a new, empty SSD drive. The laptop originally had Windows 10 preinstalled on it and I believe its motherboard contains Win10 key.


To achieve this I downloaded Windows 10 image from the official MS website and wrote it on a USB thumb using another laptop with Linux Mint (sadly, I have no other Windows PCs).


However, to my surprise, I am unable to boot the laptop in question with the said USB. It is not even listed in BIOS as a boot option!


I tried making sure if this laptop is capable of booting USBs at all, and the answer seems to be yes: it could boot from a Linux Mint LiveUSB. I also tried making sure if the Windows10 USB thumb is not faulty: I plugged it to this other Linux Mint laptop that had never had Windows10 installed and the USB was listed in the laptop's BIOS as a boot option, though booting into it deferred to HDD (I assume Windows security measures took off).


I should note this is the second time I'm trying to reinstall Windows10 on this computer due to failing HDD. The previous time I had the servicemen replace the HDD for me and afterwards I was successful in reinstalling Windows10; however, while I'm not certain, I have vague memories of failing to use USB that time as well and having to resort to DVDs.

Email getting marked as spam by gmail, hotmail but OKed by spamassassin

I am having some issues with emails getting sent from one of my websites using the PHP mailer. When I am using my own email server with spamassassin the emails come through without a problem, but with gmail and hotmail they go straight to the junk box! I can't for the life of me figure out why.



I've tried several things including setting up SPF (no idea if I did it properly though).



I used the Brandon Checketts website to run an email test and the SpamAssassin score from the email came back as 1.1 which indicates it is okay... I've run out of ideas!



Here is the full report from Brandon Checketts.



UPDATE:




I tried to use DKIM as a way of resolving this issue but I'm now having a problem with that. I'm getting this error message from Brandon Checketts:



result = fail
Details: message has been altered

Download but not Install Windows 8


I'm planning on upgrading to Windows 8 Pro by the end of January while it's 160 bucks cheaper, and I was wondering if it's possible to download, but not immediately install it. If the Upgrade Assistant mentioned on the download page only downloads the iso image and leaves the installation to the user, that's great. However, I don't want it to accidentally install windows 8 and overwrite windows 7. For those of you who are curious, I plan on running it through VirtualBox.


If anyone has upgraded to Windows 8, tell me exactly what this Upgrade Assistant does...


Answer



Run the upgrade assistant & it allows you to download the setup files & either run Windows 8 setup right away or create the ISO file/bootable USB/leave it as it is to run the install later.


You don't have to install right away


IPv6 AAAA vs. CNAME for same domain name




I reach my home site through a DynDNS name, and also have tunneled IPv6 there.



In the DNS zone, I have:



myhomesite CNAME example.dyndns.org.


How do I simultaneously point "myhomesite" to an AAAA record? If I trivially make it



myhomesite CNAME example.dyndns.org.

myhomesite AAAA 2001:db8::1:2:3:4


the zone is invalid (CNAME and other data).



Can you suggest a way for having the CNAME record and the AAAA record visible behind the same domain name?



What I'm not looking for is an ".ipv6."-infixed record, which already is in place.


Answer



I copy from DNS for Rocket Scientists:





CNAME RRs cannot have any other RRs
with the same name, for example, a TXT
- well that was true until DNSSEC came along and in this case RRSIG, NSEC and
certain KEY RRs can now occupy the
same name.




Therefore what you want to do cannot be done using a CNAME. Use the CNAME to access your homesite via IPv4 and have a myhomesite-v6 AAAA record point to the IPv6 address




If you do not want such a solution, you have to implement a mechanism that updates your DNS zone each time your IP address changes with:



myhomesite IN A IPv4.add.ress
IN AAAA IPv6.add.ress


But that depends on the API (if any) that your DNS provider exports to you. For example if I had root access on the DNS server, I would periodically host -t a example.dyndns.org and use the output to update the zonefile with the IPv4 address for myhomesite.


Thursday, October 29, 2015

usb - I lost my windows 7 CD and my hard drive was cleared. What should I do?


Related Questions:
Install Windows 7 from USB flash drive
How can I reinstall Windows 7 if I lost my installation DVD?



I'm trying to boot from an old Vista disk but I'm not getting anywhere. I think my best bet is trying to install windows from a usb instead. How would I go about doing that? Like I said, when my computer boots up I can't get anywhere since the hard drive is formatted. Thanks!

sql server 2008 r2 - Minimal required user permissions for running MS CRM

We have several M$ CRM instances running.
Each one has its own dedicated SQL Server instance.



The permissions are set up in accordance with the Microsoft recommendations for setting up MS CRM.



However, I can't find any documentation regarding minimal required permissions to run CRM.
Currently we have the following two permissions that I would like to remove:




  • CRM app pool user has administrator on the SQL Server machine

  • CRM app pool user has sysadmin on the SQL Server instance




My main concern is that this user is currently grouped in with other service account users when it comes to permissions (and the process for obtaining/changing the password). However it is for all intents and purposes an administrator account.



Does anyone have any prior experience with removing the CRM app pool users' permission after installation?

windows - Add leading zeros to the middle of non-sequential filenames


I've got over 1200 files (inside subfolders) which I have to rename by adding leading zeros to the middle of the file name. I want to do this because the program I load them into doesn't know that "10" comes after "2".


Here is an example of what I have:



  • Roses MIDI 1 - C Maj.mid

  • Roses MIDI 1 - Var1.mid

  • Phantom MIDI Loop 26 - C Min.mid

  • Galaxy Chord MIDI 231 - A Min.mid

  • Posty MIDI Loop 1 - 100 BPM E Maj.mid


And here is what I would like it to be:



  • Roses MIDI 001 - C Maj.mid

  • Roses MIDI 001 - Var1.mid

  • Phantom MIDI Loop 026 - C Min.mid

  • Galaxy Chord MIDI 231 - A Min.mid

  • Posty MIDI Loop 009 - 160 BPM G# Min.mid


I had a little success with the following powershell command:


get-childitem *.mid -recurse | foreach { rename-item $_ $_.Name.Replace("MIDI 1 ", "MIDI 001 ")}

This added 2 zeros to the front of every "1" which followed a "MIDI" and had a space behind it. I could do this for all the single digit ones I want to rename, but it breaks down when you get to the 10s, 20s, etc.


Is there a command (or a free program) which could do this automatically for me? It feels like there should be... but, this is my first look into powershell, so I'm not sure what all it can do, and what limitations it has.


Also, if it helps (I just checked) the number I want to prepend zeros onto is always the first number in the file name.


Answer



So.. looks like I took to powershell faster than I thought I would.
After many hours, a headache, and 20+ google tabs, here is the answer I crafted:


get-childitem *.mid -recurse | foreach {
$tmp = $_.Name
$tmp = $tmp -split ' ';
$noNum = $true;
$tmp = foreach ($s in $tmp) {
if($noNum){
if($s -match "\b\d\b"){"00$s"; $noNum = $false}
elseif($s -match "\b\d\d\b"){"0$s"; $noNum = $false}
else{$s}
}
else {$s}
}
$tmp = $tmp -join ' ';
rename-item $_ $tmp;
}

and a translation:


get all midi files (including those in a subfolders) and loop through them.
Create a temp var, and store the name of the midi file in it (no directory)
Split temp at each ' '
create noNum var and set it to false (this keeps track of if we've hit a number)
loop through each substring in tmp, changing them as needed
if we have not found the first number, check for it
if the substring is a 1 digit num, add two 0s, and set noNum to false
if the substring is a 2 digit num, add one 0, and set noNum to false
else, not a number, just return substring
else, first number found, just return substring
join tmp substrings back together with a ' ' in between each one
rename the file to tmp.

I'm sure there is a more elegant solution (which I'd love to see!) but this worked for me =]




P.S.
If anyone else got midi files from Cymatics, you may want to run the following to get rid of their prefix:


get-childitem *.mid -recurse | foreach { rename-item $_ $_.Name.Replace("Cymatics - ", "")}

then/or


get-childitem *.mid -recurse | foreach { rename-item $_ $_.Name.Replace("Cymatics ", "")}

In the program I am using, having the prefix makes it waaaay to long to see the number.. so removing the prefix is a must.


mysql - LAMP memory management (CentOS)

First of all, I have to say I am not an expert in server administration. I have done web programming for 10+ years on several platforms, but have most of the time come to a readymade situation where there's IT professionals or a good web hosting company involved.



Now I'm finally in a spot where I was required to build a LAMP-setup from scratch (with just a vanilla CentOS install) to serve a pretty intense Wordpress setup.



Everything kinda went smoothly as I have been around the block with Linux-based server administration to get things running, but I'm getting really weird system freezes a few times per week and since I'm the only one who can access the server and boot up services, this is REALLY annoying.



Here's some key data:



Server





  • 384MB memory

  • CentOS 5.6

  • PHP 5.2.10

  • MySQL 5.0.77

  • Apache 2.2.3



Usage



  • ca. 300 articles in Wordpress

  • ca. 10k weekly unique users

  • ca. 100k monthly pageviews


  • Things done:




  • All static stuff (jquery, styles, layout images) are server from an external webserver.

  • Wordpress cached as heavily as possible (W3 Total Cache)




I've narrowed the problem down to memory management - or the lack thereof. For some reason swapping is disabled on the server and once the memory consumption reaches 100% the server simply goes into thrashing and all hope is lost. The amount of memory (384MB) should still be more than enough to host a site with these stats, so something is done wrong. I'm just running out of ideas what it could be.



I've obviously tried tweaking the settings in my.cnf, php.ini and httpd.conf but to no avail. Here's my key settings at the moment:



my.cnf



skip-innodb
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

skip-locking
skip-ndbcluster
skip-bdb
skip-networking
safe-show-database
query_cache_limit=8M
query_cache_size=48M
query_cache_type=1
max_user_connections=200
max_connections=32

interactive_timeout=60
wait_timeout=60
connect_timeout=50
thread_cache_size=4
key_buffer= 96M
join_buffer=1M
max_connect_errors=20
max_allowed_packet=32M
table_cache=1024
record_buffer=1M

sort_buffer_size=6M
read_buffer_size=6M
read_rnd_buffer_size=6M
thread_concurrency=4
myisam_sort_buffer_size=32M
server-id=1
user=mysql
tmp_table_size=64M
max_heap_table_size=48M



php.ini



memory_limit = 128M


httpd.conf



StartServers       2
MinSpareServers 3

MaxSpareServers 5
ServerLimit 16
MaxClients 16
MaxRequestsPerChild 1000


This is the part where it might be very self evident I'm flying by the seat of my pants here. Are these settings even remotely sensible for a 384MB server setup? What else can be done to reduce the number of crashes where the only solution is me logging in to restart mysqld and httpd?



I know all this is more or less been discussed a million times before and trust me, I've gone through all the threads I've found, tried all the tips and pointers, but to no avail.




The silly thing is that we moved from a pretty reliable web hosting setup to this way more costly virtual server setup to cut down on worries on server stability and scaling, but it has in fact made things even worse and no doubt 99% due to my own shortcomings as an admin!



So please, gurus, help me out a bit. I promise I'll never bitch to an IT guy about anything and will write only code that's easy to deploy, won't crash in the middle of the night and generally remember you in a positive way on other days in addition to Sysadmin Day.

postfix - Current Load is WARNING - why?



On a VPS with 1 CPU core and 2GB RAM, I run a mysql+apache2 for a low traffic website. Sometimes the machine slows down or stops delivering through apache or mysql.



That's why I set up nagios which is sending me alerts like "Service Alert: localhost/Current Load is WARNING" after 5-10 days of running. Then I can login through SSH and check RAM with "free" which is still enough, 500MB+ available and only 60MB of swap in use.



Since the system slowed down again, I checked the syslog and found lots of these entries:





Jun 30 23:46:31 cl22 postfix/error[2190]: 46D8974323:
to=, relay=none, delay=294806,
delays=294803/3/0/0, dsn=4.4.3, status=deferred (delivery temporarily
suspended: Host or domain name not found. Name service error for
name=zombine.com type=MX: Host not found, try again) Jun 30 23:46:31
cl22 postfix/error[2193]: 49CB374123: to=,
relay=none, delay=154189, delays=154185/3.1/0/0, dsn=4.4.3,
status=deferred (delivery temporarily suspended: Host or domain name
not found. Name service error for name=zombine.com type=MX: Host not
found, try again) Jun 30 23:46:31 cl22 postfix/error[2153]:

4E2C874250: to=, relay=none, delay=433708,
delays=433704/3.1/0/0, dsn=4.4.3, status=deferred (delivery
temporarily suspended: Host or domain name not found. Name service
error for name=zombine.com type=MX: Host not found, try again) Jun 30
23:46:31 cl22 postfix/error[2176]: 480D874180:
to=, relay=none, delay=174308,
delays=174304/3.1/0/0, dsn=4.4.3, status=deferred (delivery
temporarily suspended: Host or domain name not found. Name service
error for name=zombine.com type=MX: Host not found, try again)





How can I find out which process is consuming all the load? It's really lots of overload for a 1-core VPS: WARNING - load average: 3.06, 5.79, 3.42



mysql is OK, apache2 seems to be OK. postfix maybe not? anything else I did not identify yet?



Please let me know how to find out the bad process and temporarily renice or un-priorize postfix etc. to make sure that apache2 and mysql remain healthy. These 2 processes are important to me. The outgoing emails, too, because it's sending messages to clients.


Answer



That error you're seeing is not an error related to the email address; it's a DNS problem. Make sure you can see the MX record for your domain zombine.com from this server if it sends emails:



dig in mx zombine.com



Postfix will continue attempting to send these emails over and over for days in case of a "recoverable" failure like this one.



One other thing to check out is whether you are having disk load problems (check out the hardware interrupt CPU usage, "hi", in top). If that is the issue, you can install and run iotop to see what is taking up all the load.



You can configure these parameters (in days) to adjust how long postfix tries to deliver undeliverable mail for:



maximal_queue_lifetime (normal messages)
bounce_queue_lifetime (bounce messages)



Additionally, make sure the following settings are correct to ensure you are not operating an open relay (this can be a source of unwanted SMTP traffic as people use your server to send spam):



mynetworks (in this case probably 127.0.0.1/32)
smtpd_client_restrictions (probably permit_mynetworks, reject_unauth_destination)


Then, empty your mail queue:




postsuper -d ALL


This is case-sensitive for safety reasons. You should then find that postqueue -p shows an empty queue.


security - Configurable ftp-proxy with LDAP authentication

I am looking for solution for following situation.



I have bunch of ftp account (many servers) and many users. They need access to that servers. I don't want to give every user passwords to every server.




My idea is to setup ftp proxy with LDAP authentication so every user have to use his own password. In order to that, ftp proxy must have list of ftp accounts.



Ftp-proxy supports LDAP but I don't know if there is any way to implement list of accounts.

permissions - Hourly Clamscan cron script failes at reading file list

I've this piece of code located in /etc/cron.hourly/hourlyclamscan.




#!/usr/bin/bash
# Create Hourly Cron Job With Clamscan

# Directories to scan
SCAN_DIR=/home/transmission/Downloads

# Temporary file
LIST_FILE=`mktemp /tmp/clamscan.XXXXXX`

# Location of log file

LOG_FILE=/var/log/clamav/hourly_clamscan.log

# Make list of new files
/usr/bin/find "$SCAN_DIR" -type f -mmin -60 -fprint ${LIST_FILE}
# Scan files and remove infected
/usr/bin/clamscan -i -f ${LIST_FILE} --remove > $LOG_FILE

# If there were infected files detected, send email alert
if [ `cat ${LOG_FILE} | grep Infected | grep -v 0 | wc -l` != 0 ]
then

echo "$(egrep "FOUND" $LOG_FILE)" | /bin/mail -s "VIRUS PROBLEM" -r clam@nas.local #####@#####.##
fi
exit


When I run it from the terminal, it give no error.



However, when cron runs the script, it sends an error to the root mailbox:
ERROR: --file-list: Can't open file /tmp/clamscan.MLXep5




The file is created by find and owned by root (permission 600). The cron job is also run as root, so I assume permissions should not be an issue (or is it?).

network shares - Expanding Synology NAS in the future to a Raid 5

I have a question very similar to this: https://serverfault.com/questions/607437/will-expanding-my-synology-hybrid-raid-delete-the-data-on-the-initial-disk


I have just bought a 4 drive Synology NAS unit (2nd hand), and I have a single 8TB hard drive. The cost for this for a home solution has been quite high, but I like the allure of being able to plug in 3 more drives in the upcoming years as a Raid 5 setup for a total of 24GB.


My questions are with regards to the setup of this single drive:


1) If I plug this drive in now, it will effectively be a Raid0, and in say 12 months time if I plug in a 2nd hard drive, will the conversion to another raid system lead to data loss? (i think this is most probable)


2) Given that the above solution might lead to data loss: I have 1x 8TB hard drive, but I also have 2x 2TB hard drives spare, is it possible to start off a raid 5 system with these drives (I know I will not get the full 8TB storage - which does not matter right now), then migrate the data and swap out the 2TB drives later. Will this allow me to maintain Raid 5 and no data loss?


For example my server would look like this over the next few months:


empty, 2TB, 2TB, 8TB ( this drive is used for data consistency)


I then plug in another 8TB drive


8TB, 2TB, 2TB, 8TB


I then remove one of the 2TB drives after migrating the data:


8TB, empty, 2TB, 8TB


I then add an 8TB drive:


8TB, 8TB, 2TB, 8TB


and so on and so forth, until I have all 4 slots filled with 8TB.


Is that a feasible solution? Can I decommission a 2TB drive, and will the NAS move the stored data to the other drives in the system (I understand raid by default scatters the data across all drives in the NAS)?

Laptop Keyboard issue - is it a virus?

My girlfriend's laptop (an eee pc) just started malfunctioning, and it looks to me like a virus - the keyboard is not working at all, yet sending keypresses anyway, resulting in crazy beeps any time the laptop is on. It also types characters repeatedly without a key being pressed.


Windows media player also appears intermittently.


Has anyone here any idea if this is a virus, or better still, know how to fix the issue?

license - How to remove or deactivate my windows 7 licence on one computer and use it on another








I want to remove my windows 7 genuine licence from one computer and install windows 7 on another computer using the same licence key. I know the licence is somehow locked to the hardware of the original computer - but is there a way to uninstall the windows licence, so it can be re-used, and locked to new hardware?



(The original PC will go back to XP)

Disable automatic driver installation in Windows 10

How to disable automatic driver installation in Windows 10?


I have this Broadcom 802.11n Network Adapter (MacBook Pro 2011 w/ Boot Camp) whose driver I need to roll back to an earlier version for things to work properly, however Windows keeps reinstalling the newer version.


I tried the method outlined at http://windowsinstructed.com/disable-automatic-device-driver-download-in-windows-10/ to no avail:



  1. Open File Explorer and go to This PC.

  2. Then click on System Properties

  3. Under the Computer name, domain, and workgroup settings group, click on Change settings.

  4. Click on the Hardware tab.

  5. Under the the Device Installation Settings group, click on Device Installation Settings

  6. Now click on No, Let me choose what to do, then select Never Install Drivers from Windows Update.

  7. Click on Save Settings, a system reboot is then necessary for the changes to take effect.

vmware vsphere - Steps to upgrade vCenter 5.0 to 5.1 with a fresh 5.1 install on a different VM




I'm running vCenter 5.0 on Server 2008 R2 and would like to put vCenter 5.1 on Server 2012. Can someone confirm or deny the following steps?




  1. Do in-place upgrade of vCenter 5.0 to 5.1.

  2. Install fresh vCenter 5.1 install on new Server 2012 VM.

  3. Migrate database from old VM to new VM.



Alternatively, because my environment is small (2 hosts) I'm also considering just installing 5.1 on a new VM and foregoing the existing 5.0 database. The problem is that I don't know what data I would lose (other than historical performance statistics) and need to reconfigure. What would I need to reconfigure if I went that route?




Any feedback is appreciated.


Answer



You wouldn't lose that much in that small an environment. As mentioned, you would lose historical performance/event data. You would also lose any custom HA/DRS rules you might have created.



I'm not 100% sure on this, but I believe you can install vCenter 5.1 on a new system and, during the install, point it to your previous database and have it upgrade it as part of a fresh install on a new server. This is assuming you aren't using SQL Express but a full SQL Server on the backend. Otherwise, you might be able to install the SQL Express instance first on the new server, detach/reattach (or backup/restore) the database from the old to the new and then run the install and point it to your previous database.


Wednesday, October 28, 2015

download - Wget returning error: "Unable to establish SSL connection."


When I try to run Wget with the following options:


E:\Program Files\GnuWin32\bin>wget -p --html-extension --convert-links --no-check-certificate https://minecraft.net/en-us/
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = E:\Program Files\GnuWin32/etc/wgetrc
--2017-02-24 10:38:01-- https://minecraft.net/en-us/
Resolving minecraft.net... 52.84.24.33, 52.84.24.150, 52.84.24.230, ...
Connecting to minecraft.net|52.84.24.33|:443... connected.
OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
Unable to establish SSL connection.

I get the error: Unable to establish SSL connection. The website that I am trying to download is safe.


I have also tried to change the protocol to SSLv3, but it still is not working.


Can someone tell me why it is doing this and how to get around it?


Answer



As SSL Labs shows, only TLSv1.0 and above are supported by minecraft.net. You can't use SSLv3 with it. It's likely that your version of wget doesn't support this (possibly due to being too old). Try upgrading it.


Alternate Windows Chkdsk GUI to prompt to see details



I have a problem with my HD. So I run chkdsk /r/f - But now the verification stoped in 38% for more than 2h.



The PC looks normal, responding to keyboard. So, there's a way to alternate this screen to prompt for read details of operation?



Ps: sorry for my bad english.


Answer




The behavior you are seeing from chkdsk is fairly typical when doing a physical level scan. If chkdsk finds an issue and is attempting to repair it, it can be at the same percent complete for many hours, even more than a day.



I think what you are asking for is a way to run chkdsk that provides more feedback so that you can be sure that it is still running and isn't frozen.



If thats the case, your best option is to use the verbose flag, /v; so you would call it as chkdsk /r/f/v.



This will provide more information, but you will still have long periods of time when there is no information output.



In short, it sounds like you do have one or more errors on the drive that chkdsk is trying to fix which can take a very long time, and it is extremely common for people to think that chkdsk has frozen in these cases. Add the verbose flag for a little more status info, but you really just need to let it run as long as it needs to. If it runs for an incredibly long time (2+ days), then you can be sure that it is either frozen or otherwise not working properly. Otherwise, just let it run until completion.




As a rough approximation, if you ran chkdsk /r/f on a 1TB drive that had no issues at all, you can expect it to take somewhere in the range of 3 to 6 hours. There are far too many variables involved to give an exact answer, but if you search around you'll find numbers in this area. Once an issue is identified by chkdsk, the amount of time becomes basically impossible to estimate - the tool is designed to recover data on corrupt sectors and it will do everything it can to do so with no time limits.



This is a good writeup on chkdsk from microsoft.



Update



You can find the log created during that chkdsk run following these directions



There should be details in it regarding the issues found and whether unrepairable issues were found. Post the log if you'd like help interpreting it.




In any case:



You should back up everything that you can't replace on that drive asap.



Then either download the hard drive support / test utitlity from your hard drive manufacturer (preferred method) or a free utility such as passmark disckcheck. Either of these options will evaluate the health status of the hard drive (SMART status)



The question to be answered is if you have a hardware issue (failing drive) or a just a file system corruption. The former can easily cause the latter, which creates some confusion. The utilities I mentioned above evaluate the hardware state, and not the file system directly. chkdsk looks at the file system primarily.



If you can find the hdd manufacturers utility they will usually include full tests you can run on the drive, and typically will assist with warranty issues in the event of an identified hw issue, which is why that path is preferred.




Post your results - chkdsk log, hdd health check, hard drive make model, etc - for additional assistance.


APC Smart UPS serial connection on Windows Server 2012 R2



I have an APC UPS 620 and a Windows Server 2012 R2 (non virtual) server. The server and the UPS are connected with genuine APC serial signaling cable.




  1. Without installing any software the APC is not recognized as a device in the Device Manager. Is that normal/expected? I've read that USB connected APCs are recognized.

  2. How can I monitor that APC from the server? I recently installed the latest PowerChute Business Edition (v9.2 for 5 node), but I don't see the APC listed either during the installation process. As far as I understand this latest version may not support serial signaling at all?




Some search shows that PowerChute v7.05 supports serial signaling but that version dates back to 2007, so way back before 2012 existed.



What's the best method to monitor my APC UPS in this case?


Answer



Configured http://www.apcupsd.com/ so far, http://www.apcupsd.com/manual/manual.html#a-simple-configuration-for-a-serial-smartups works



UPSCABLE smart
UPSTYPE apcsmart
DEVICE COM1
UPSCLASS standalone

UPSMODE disable


Also possible to add email sending, useful links:




  1. http://www.miqrogroove.com/blog/2011/installing-apcupsd-for-windows/

  2. http://www.packetwatch.net/documents/guides/2010030801.php


pdf - Printer not printing because of wrong size paper

Our company recently upgraded its "bizhub" Konica Minolta printer to the latest version and this printer has been one hassle after another. Today, I tried to print a normal document and the printer went into error and basically shut down until it was manually reset. It complained that the "paper size is incorrect" and it apparently thinks the document is A4 and it refuses to print apparently unless I load it with A4 paper which I don't have because our company is in the United States and does not buy paper from Europe.



Here is what the print screen looks like:



enter image description here



How can I get this document to print? I have tried changing it to "Fit" but it makes no difference. Same error.

windows 7 - Stop Parallels Desktop from opening mac excel when trying to open the virtual machines copy



Im using Parallels Desktop 8 to allow me to run Windows 7 on my Macbook, i use it mostly for browser testing IE, and running certain vba macros which will not run in mac Excel 2011.




Whenever i try and open an excel file in the virtual machine it opens it in the mac version of excel, the way i get around this is to open windows excel and use file > open.



Is there a way to set it to default open in the native version.. ie. opened in Windows run it in windows ?


Answer



You can set your defaults check out this link http://download.parallels.com/desktop/v9/ga/docs/ko_KR/Parallels%20Desktop%20User's%20Guide/32927.htm



I just use the right click method.


networking - IPs on home network

I have a Linksys router and a Belkin wireless router at home. The Linksys router is connected to cable modem and two computers, as well as to the Belkin wireless router.


A 3rd computer is connected to the Belkin router through Wifi.


The IP addresses of the computers connected to Linksys are 192.168.1.101 and 192.168.1.102.
The IP address of the Linksys router on LAN is 192.168.1.1.


The IP address of the Belkin wireless router is 192.168.2.1(based on the 3rd computer's routing table) and the IP address of the 3rd computer is 192.168.2.5.


If I ping 192.168.1.101 from 192.168.2.5, all are well. However, if I ping 192.168.2.5 from 192.168.1.101, Destination Host Unreachable.


Why?

windows 7 - How to reinstall bootloader after migration to SSD

I must say, it was difficult to name this question.


Basically, I need to properly reinstall the bootloader on my system, because I already have the working system disks for my OSes.


The long story is this: I had the large slow HDD with Windows7 & Debian Wheezy dual-boot on it, perfectly bootable. Then, I ordered the SSD drive and prepared my system partitions to fit onto the much smaller SSD. I wanted the following schema:


128 GB Windows
24 GB / on Debian
86 GB /home on Debian

Strange size for /home because there's no such thing as true 256GB disk drive.


So, I've prepared such a partitions on my initial HDD and installed the new SSD and then I loaded the GParted live USB (can't remember now how it was really named), and then just copypasted the partitions from HDD to SSD.


So, now I have the following partitions across the physical disks:


SSD
128 GB copy of original Windows partition
24 GB copy of presumably Debian /
86 GB copy of presumably Debian /home
HDD
128 GB Windows
24 GB / on Debian
86 GB /home on Debian
... several other partitions with non-system data ...

And the behavior of the system right after the Ctrl+C, Ctrl+V in GParted was as follows: no GRUB, system boots right into the Windows on HDD.


In BIOS settings are to boot from SSD first.


I managed to create the Debian Testing installation USB and loaded it into the rescue mode, found that it identified my SSD as /dev/sda and installed the GRUB to the /dev/sda. Now my system loads the GRUB which lists both Windows and Debian. From HDD. So, I am now back into initial position.


Please, how I should set up the GRUB so it'll load the OSes correctly from SSD?


Should I fire up my Debian, fiddle with the GRUB's config and reinstall it again to the same place (at SSD)?

Can't get Insider Preview builds for Windows 10

I successfully installed a Windows 10 Education Insider Preview image onto my machine. Now, I'm getting notifications telling me I need to change my settings. When I click on them, I see this screen:Fix me screen




I have a pulse, so I click on "Fix me." Then I get this banner: Privacy settings banner



And hit confirm. Once I do that, the screen briefly shows a loading sign, then returns to the "Get Insider Preview builds" screen with no change. I've checked the registry settings in this article, and they appear to be correct. My "Feedback & Diagnostics" settings screen looks like I'd expect:Feedback & Diagnostics screen



So I'm pretty much out of ideas. Does anyone know what I can do to fix this? I'm currently installing new builds by downloading the ISOs and installing manually from there.

Tuesday, October 27, 2015

Prevent Excel from pasting a cell across an entire row

Excel has a behavior that I guess has been purposefully designed but which has made me lose quite a lot of time over the years. This behavior happens after the following steps:



  • Copy a finite range of cells (Ctrl + C)

  • Select a line or a column (Shift + Space or Control + Space)

  • Insert new (Ctrl + "+")


I do this a lot, always involuntarily, when trying to insert a new row or a new cell before pasting my cell or range or cell.


When this happens, the cell or range is inserted not once but across the entire line or column, e.g. if I have selected a 2x2 range and insert in on one row, it will be repeated until the end of the row.


If I copy then insert this range:
enter image description here


It then repeats it across an entire row (until column XFD!):
enter image description here


This is very annoying because it sometimes take quite a bit of processing power to process the entire row(s) of pasted stuff, especially when it contains formulas; and it takes even more time to Ctrl + Z for some reason (cancelling the insertion of an entire row of pasted formulas often makes the computer freeze for a few seconds, and has even, on some occasions, caused Excel to crash altogether). There have been literally zero occasion of which I have triggered this behavior purposefully.


Of course, one solution would be to never insert something that you don't want to insert (duh) but that is actually not that easy and I know some of my colleagues sometimes make the mistake as well.


Is there a way to disable this behavior?

apache 2.2 - mod_rewrite: access URL-path in RewriteCond

How can I match against the URL-path from the RewriteCond in a .htaccess?



I'd like this because I'm trying make one subdirectory of my web server transparently proxy + cache requests to another server, and I'd like to write the .htaccess like this:



RewriteCond "%{ENV:CACHE_BASE}/%{URL_PATH}" -f
RewriteRule (.*) "%{ENV:CACHE_BASE}/$1" [L]

RewriteRule (.*) "download_and_cache.cgi?$1"


So that requests for files which already exist in the cache will be sent from within Apache, and requests for files which aren't in the cache will be handled by the download_and_cache.cgi script (which will put them in the cache).



NB: I can't use %(REQUEST_URI}, because if the .htaccess lives at /foo/, a request for /foo/README.txt will result in a cache check for $CACHE_BASE/foo/README.txt, instead of $CACHE_BASE/README.txt as it should.

malware removal - How to install anti-virus without administrative rights?

In situations where the PC has no CD drive and operating a guest account with limited privileges, how to install an anti-virus tool? Malware is not permitting to open any anti-virus vendor's site and also blocking all sites opened via Google that contain the term "online scan".




I somehow managed to download through mirror links with a Download Manager as the browser's download was blocked by the malware. But the problem didn't end there. After I downloaded the anti-virus tool, it failed to install because it needed administrative rights. The user didn't know the administrator password.



I tried via command line with runas, but it also asks for the administrator password. The OS is Windows XP.



How to deal with these type of malwares if there is a scenario that CD drive is not there only Internet is there?

ubuntu - Force scaling when printing an alien paper size

Is there any way to automatically rescale a print job to a paper size supported by the printer even if the application printing has used a different paper size?


I have lot of problems with different clients trying to print US Letter on a printer with A4 paper. It is very easy to miss setting up the correct paper size and then the printer job fails and the printer has to be physically accessed to reset the error. Also any jobs submitted after the error is silently ignored resulting in missing printouts.


I am using Ubuntu and CUPS together with a Konica Minolta network printer.


Ideal CUPS would silently accept any paper size and rescale it to fit into A4 paper and send it to the printer. Is this possible somehow?


Any ideas?

configuration - Apache config: Return 404 for single



Is it possible to let Apache automatically return a 404 page for a single URL using the Location tag?





# ???



Solutions without mod_rewrite or any other modules preferred.


Answer



The only solution "without any modules", is to not have the resource exist. If the location doesn't exist, then it Apache will return a 404.



Otherwise, you will need to use mod_alias or mod_rewrite. mod_alias is the simpler and more efficient solution:




Redirect 404 /your/url/path


You use this inside your vhost, there is no need to put it in a Location block.



You can also use the RedirectMatch directive if you don't want to match URLs below /your/url/path:



RedirectMatch 404 ^/your/url/path$



This and more can be read in the mod_alias documentation


Can I disable auto logon on windows 10 home


I recently setup a new computer for my parents with windows 10 home. I made two local accounts for them - no microsoft accounts. I also would like to keep them without a password. Problem is now that windows automatically signs in with the last used account. No lock/login screen.


I tried a number of answers from similar questions here but none worked. Since it's a home version there are no group policies and the method using task scheduler does not work because accounts with no password are not allowed to create such tasks.


Are there other options to force windows to show a user list on startup without setting passwords for the accounts?


Answer



The following link describes how to change this behaviour in Windows 8 using a registry setting and some permissions on that registry setting. It also works with Windows 10.


http://www.eightforums.com/user-accounts-family-safety/10004-help-multiple-users-login-screen.html




First launch the registry editor: Press WIN + R, type regedit and click "OK".


Navigate to the following path:



HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\UserSwitch



Change value of the key Enabled from 0 to 1


There's one more problem to solve: The user SYSTEM automatically changes the value to 0. So we will disallow the user SYSTEM to change it.



  • Right mouse click at registry key UserSwitch -> Permissions

  • Click on Advanced and then on the Disable inheritance-button; if your are prompted with two options now, choose the first one (Convert inherited permissions into explicit ones for this object)

  • At the top of the dialog, change the owner from SYSTEM to the group Administrators (if your Windows is not in English, the name might differ a bit, e.g. in German it would be "Administratoren")

  • Select the group Administrators entry -> Allow -> full control

  • Double click the entry for SYSTEM, select type Deny and click on Show advanced permissions. Here Clear all -> only check Set value


windows - How to delete weird directory `=..`

Running this command 7z.exe e -o=.. example.zip created a directory =...



How can I delete it again?








  • Windows Explorer can not delete it: "An unexpected error is keeping you from deleting the folder. ... Error 0x80004005: Unspecified error"

  • Windows Explorer can not rename it either: "Could not find this item"

  • del =.. can not delete it: "Could Not Find =.."

  • rename =.. x does not help: "Access is denied."



Any other ideas?

keyboard shortcuts - How to use Shift+CapsLock+L to select text


I used the following code to remap some key combinations. However, they do not work when pressed by other modifiers. For example, I want to select text using CapsLock+Shift+L (just as Shift+Right Arrow does), but this does not work. What's wrong with it?


CapsLock::Send, {CTRLDOWN}{SHIFTDOWN}{SHIFTUP}{CTRLUP}{CTRLUP}
return
!^CapsLock::CapsLock
CapsLock & j :: Send {Down}
CapsLock & k :: Send {Up}
CapsLock & h :: Send {Left}
CapsLock & l :: Send {right}
CapsLock & p :: Send {PGUP}
CapsLock & `; :: Send {PGDN}
CapsLock & ^ :: Send {home}
CapsLock & $ :: Send {end}

Answer



See help topic on Remapping Keys and Buttons


Add {Blind} as needed... I'm not sure the first two lines of code listed are necessary but I'm sure you can get it to work...


CapsLock & j  :: Send {Blind}{Down}
CapsLock & k :: Send {Blind}{Up}
CapsLock & h :: Send {Blind}{Left}
CapsLock & l :: Send {Blind}{right}

How does vCenter alter ESXi Host connectivity to Guest VMs?



Prior to installing vCenter, I had been using vSphere (local thick client) and was able to authenticate to the ESXi host and click "Open Console" to control guest VMs.



After installing a vCenter appliance server, I'm unable to view the console on some guest VMs, either from vSphere local client or the vSphere web client hosted on the vCenter server.



Attempting to use either console view I receive the following error:




Unable to connect to the MKS


Since I was able to remote console through the vSphere local client prior to installing vCenter, I suspect that vCenter somehow alters the way the vSphere local client/ESXi host would remote console to guest VMs.



I am certain there have been no changes to the VMs I am unable to access.



tl;dr; How does installation of vCenter alter ESXi Host console access to guest VMs?


Answer




I was able to successfully "open console" (view console) on my VMs after completely reinstalling ESXi, and re-adding the VMs on the datastore.



This doesn't completely answer the question of what vCenter installation does to an existing ESXi installation that prevents console access, but does provide a workaround.


Monday, October 26, 2015

How should I configure my Active Directory servers so that if one goes down, users are not kicked off SQL?

Today, we shut down one of our Active Directory servers during office hours to check the loading on a UPS. Since all the server did was provide Active Directory in a separate building incase the main building caught fire, or whatever, we didn't think it would have any effect on our users.




Seconds after the server was shut down, we had a dozen phone calls from users experiencing this issue:-
[Microsoft SQL Server Login]
SQLState: '28000'
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed. The login is from an untrusted domain and cannot be used with authentication.



Once we realized what had happened, we quickly rebooted the down Active Directory server. Problem solved.



But why did this happen. And what if one day a server has a breakdown and is offline for hours, or days? Shouldn't the other Active Directory servers in the domain service authentication requests without disruption to users?




We have 3 Windows Server 2003 Standard servers running Active Directory as Domain Controllers with Global Catalogs, all physically located on the same network at Gigabit speeds.



I believe the domain was originally Windows Server 2000, or maybe even NT 4.0. Could the issue be to down to old Group Policies inherited from these old server OS's, or some default setting in Active Directory that needs changing?

osx snow leopard - How to reinstall Mac OS X on OS X/Linux dual-boot system?


My setup: I have a MacBook Pro 5,5 with a Mac OS X Snow Leopard partition and a Linux partition. I use rEFIt to boot into Linux. I didn't use Boot Camp when I originally installed Linux; instead, I manually created the partition (with either Disk Utility in OS X or Gparted on a Linux live CD--I don't recall which one) and then installed Linux on it from a live CD.


The problem: My OS X partition is corrupt, and I need to reinstall Snow Leopard. Since I installed rEFIt from within OS X, I'm concerned that wiping the OS X partition will prevent me from booting into my Linux partition. How can I do this without losing access to my Linux partition? Is it possible to install Snow Leopard on the partition I reserved for it, or will it automatically overwrite the entire drive? And if I do the fresh OS X install and then install rEFIt again, will it automatically recognize my Linux partition?


Thanks for any tips!


Specs: MacBook Pro 5,5 (Mid-2009); Snow Leopard 10.6.7/64-bit Sabayon Linux, 2.6.36 kernel


EDIT/UPDATE:
Thanks, but the situation has taken a more complicated turn:


I tried to reinstall Snow Leopard from the DVD, but it refused to install onto my Mac partition, claiming: "The disk cannot be used to start up your computer." Disk Utility wouldn't let me resize the partition or create a new one, and it doesn't see my Linux partition. It only displays the two partitions "Macintosh HD" and Linux Swap.


I can, however, see all the partitions from Linux. This is the partition table as shown in Gparted:
Gparted screenshot showing all partitions, including those not recognized by OS X's Disk Utility


And the output of "fdisk -l" is:


WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 409639 204819+ ee GPT
/dev/sda2 409640 349590464 174590412+ af HFS / HFS+
/dev/sda3 483122745 488392064 2634660 82 Linux swap / Solaris
/dev/sda4 * 349590465 483122744 66766140 83 Linux
Partition table entries are not in disk order

I wonder if this is because I originally partitioned my disk with Gparted instead of OS X's Disk Utility (at this point, I don't recall whether I used Gparted or Disk Utility). In any case, it doesn't seem safe to do any reformatting with Disk Utility now, as I'm afraid it will wipe sda2 ("Macintosh HD") as well as sda4 (my Linux partition).


So... I'm hoping to find a solution that doesn't involve wiping my entire hard disk. Would it be safe/possible to use Gparted to erase sda2 ("Macintosh HD") and then use the Snow Leopard DVD to install OS X onto [I]just[/I] sda2 without touching the other partitions?


Thanks for any insight!


Answer



SOLVED! I found a thread somewhere online (don't recall where) that mentioned adding 128 MB of free space after your Mac OS X partition. Apparently, Disk Utility won't install OS X on or allow any changes to the "Macintosh HD" partition if it's directly next to a Linux partition; this might apply to other types of partitions too. So I booted up from a Knoppix live CD and used Gparted to shrink sda4 by a couple hundred MB and move it to the right, creating empty space after sda2. After that, I was able to reinstall OS X onto sda4.


linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...