New PC woes

by kkikta 9. March 2012 00:26

So i just built a new PC with the OS on SSD and a 1.5 TB Raid 1 for data. I used some tips and tricks to move the Users and ProgramData folders to the Raid Disk. Its pretty nice. Anyway last week I got my stuff installed Office, Firefox, Chrome, etc. I also Installed Visual Studio 2011 since I use it quite a lot. Anyway I haven't really used the PC much since last Saturday (Thursday evening now) and noticed that my brand new SSD was full!?! I checked the folders on the C drive and it showed that I was using 37GB. This seemed odd since my SSD is 120GB so where are the other 73GB.

My first thought is that my trick for moving Users and ProgramData backfired and the OS couldnt distinguish the difference (lucky I was wrong.) Turns out while I was away Visual Studio 2010 SP1 installed (semi successfully I guess since it shows its SP1 now.) Apparently something got mucked up during the install and two large files were created in my c:\Windows\Temp folder. The files were HPIXXX.tmp.html and Visual.Studio.XXX.html or something like that. The first file registered at over 50GB and the second at over 20GB. Needless to say once these files were cleared out things are looking up.

Moral of the story keep an eye on c:\windows\temp. It wont show the usage if you check the space used by c:\windows but its there and it can be HUGE.

Tags:

SSL Certificates and why your probably paying to much

by kkikta 20. February 2012 23:53

Every once in a while I have a friend ask me about SSL certificates and which one they should buy. First let me start off with SSL is used to encrypt data and to some extent verify the authenticity of the site. There are a lot of options when it comes to SSL certificates and some come with some neat features

Extended Validation (EV)

This is a feature where the certificate athority makes the site owner jump through some hoops to validate the authenticity of the site. Sounds good right. I agree its a good thing, but these certs are generally pretty expensive. The big draw to these is that in modern browsers the URL bar has some green coloring when visiting sites that use these. I believe for most sites this is unnecessary, so unless your in the banking, finance or some other type of high security industry (or really like the color green) I would save your money. If google is not using it for gmail or checkout then you probably don't need it for your ecommerce site.

SSL Gurantee (or Warranty/Insurance)

First I will say this I have never heard of a case where anyone has ever been able to collect on that gurantee. Second if you read about what they really are saying is they will pay only if they were neglegant, just check out the exception clause. So that being said, If its free go ahead otherwise its pretty much giving money away.

2048-bit (or some crazy high bit encryption)

First, if you site uses a 128 bit cert and  your data is capture someone could given enough time break the key and steal the data. Now that being said by the time they break that key there is a pretty damn good chance the data will be out of date. Credit card will have expired, users will have changed passwords etc. If your still unsure check out distributed.net. Using a enormous cluster of pc's all over the world it too close to 5 years to break message in 56 bit encryption and each bit basically doubles the effort. They are currently working on breaking a message encrypted in 72 bit encryption. After 9 and half years they have only tested out a little over 2% of the possible keys.

Whats the difference?

So here is the deal what your really paying for is support, ease of use and browser accpetance. The 19 dollar ssl and the 149 dollar ssl do the same thing. The support from Comodo and Verisign is probably the same as DigiCert and GoDaddy. The browser acceptance is probably a non-issue these days unless its some brand new SSL vendor. I can't actually recommend a particular vendor, I've used geotrust, verisign, comodo and godaddy. These days I go with who ever is the cheapest and that includes resellers like namecheap.

One last note, during the writing of this I just now realized twitter and my favorite source code repository bitbucket use EV certs. If I just realized that do you think your customers are even going to notice?

Tags:

General

Oracle EPM 11.1.2 (Hyperion)

by kkikta 7. June 2011 14:29

I've done a few installs of 11.1.2 recently. One was a distributed install on windows (everything except Essbase, APS and EAS on the same server a second server housed the rest.) The other is a mixed environment where everything was on windows except essbase. So below are a few of my findings regarding 11.1.2.

  1. Make sure DNS is working and that all servers can see each other by FQDN before attempting to install.
  2. Ensure that the server can see it self by DNS name (not localhost).
  3. On linux make sure SELINUX is disabled.

Failure to have either of these conditions met will cause all sorts of odd problems.

Now this may seem like common knowledge but in the case of my last two installs I was not involved with the setup of the hardware. In once instance I gave my specifications to an infrastructure team and trusted (by mistake) that they did things correctly. On the other I didn't think to check that the windows server and found out after the fact that the windows server thought its FQND resolved to the equilivent of 127.0.0.1 but in IPv6 (::1)

Tags:

Oracle | Ubuntu

Planning - Essbase users only have read access after refreshing security filters

by kkikta 28. April 2011 15:42

I had an issue here where Planning (11.1.2) users had been given access to read and write to certain areas however when we refreshed the security filters in planning only the read filters appeared in the Essbase cube. The users could enter data into planning forms but were unable to enter data view SmartView.

After opening a SR and looking around on the web we stubled upon the following forum post. It appears that when this application was migrated from version 9 to 11.1.2 that we missed a setting when provisioning users in shared services. In previous versions of shared servers the setting was called "Essbase Write Access" however in 11.1.2 the name of the setting has been changed to "Analytic Services Write Access". After re-provising the group with this access we refreshed security filters and checked essbase and vola write filters now showed up.

Tags: , , , , ,

Oracle

Trying to track cpu usage of a process in python

by kkikta 1. April 2011 05:29

So I am working on my first attempt at python... so far I like it but not that much. The white space thing is actually kinda annoying but whatever. Anyway the idea here was to write a script that would take in a parameter (process name) and track its cpu usage. My main reason for this is mono has been chewing up cpu on a regular basis and I don't feel like logging in to kill the process all the time. Anyway this is just a first pass so I'll probably edit it as I make modifications.

 

'''
Created on Mar 30, 2011

@author: Keith
'''
import os
import psutil
import pickle
import signal
import smtplib

from_addr = 'root'
to_addrs = 'root'
watchFileFormat = 'watchProcess'

def getProcessIds(name):
    processes = psutil.get_pid_list()
    pids = []
    for pid in processes:
        p = psutil.Process(pid)
        if p.name == name:
            pids.append(pid)
    return pids


def checkThreshold(percentage, threshold):
    for utilization in percentage:
        if utilization < threshold:
            return False
    return True

def cleanWatch(pids):
    for file in os.listdir('.'):
        pid = file.split('.')
        if file.startswith(watchFileFormat) and pid[1].isdigit() and int(pid[1]) not in pids :
            print(file)
            os.remove(str.format(watchFileFormat + ".{0}", pid[1]))

def watchProcess(name, threshold = 50):
    util = []
    pids = getProcessIds(name)
    cleanWatch(pids)
    for pid in pids:
        try:
            p = psutil.Process(pid)
            file = str.format(watchFileFormat + ".{0}", str(pid))
            if os.path.exists(file):
                try:
                    util = pickle.load(open(file, "r"))
                except:
                    print(str.format("Unable to file for PID: {0}", str(pid)))
            util.append(p.get_cpu_percent(10.0))
            if (len(util) > 5):
                util.pop(0)
            pickle.dump(util, open(file, "wb"))
            if (len(util) == 5 and checkThreshold(util, threshold)):
                smtpObj = smtplib.SMTP('localhost')
                smtpObj.sendmail(from_addr, to_addrs, str.format("Process killed {0} with pid: {1}", name, pid))
                os.kill(pid, signal.SIGTERM)
        except:
            pass

if __name__ == '__main__':
    import sys
    if (len(sys.argv) > 2):
        watchProcess(sys.argv[1], sys.argv[2])
    else:
        watchProcess(sys.argv[1])
 

I think this script plus the crontab below should keep mono in check:

 

*   *    *   *   *   /usr/bin/python /root/watchProcess.py mono > /dev/null 2>&1

 

Updated: 4/3/2011 had issues with cleanup due to not casting the pid from the file name as an int also moved the isdigit so as to not catch files that end with non-numeric strings. In my case watchProcess.py ;P

Tags:

FreeBSD | Mono | Ubuntu

Problem with "audio device on high definition audio bus" Windows XP SP3

by kkikta 30. March 2011 16:38

For the past week and half I have been at a client site, where they gave me the spiffy old Lenovo T61 ThinkPad to use. They installed Windows XP on it which kinda sucks cause I have gotten use to the HP EliteBook 8540p running Win7 my employer has issued me. Anyway they give me this thing and expect me to use it (which I have but only to view emails on outlook since they gave me an exchange account on their domain). My biggest gripe on the T61 one so far is that who ever imaged this machine neglected to get a working sound driver installed in the image. The T61 showed the little yellow exclimation point in device manager next to "High Definition Audio Bus". So I figured what the hell this should be an easy fix, load up lenovo's site, download the XP driver, install and vola, right? Wrong. So I try the whole normal process, uninstall, resintall and still not working so uninstall again, reboot, install using have disk etc, try a different vendor, repeat (this went on for a while)... Nothing works still got a little yellow exclimation point laughing at me... silently (I have no sound remember).

So finnally I decide ya know what, what's better than the XP driver? The vista driver! Now I don't normally suggest this but I figured what the hell its not really my laptop anyway. So I download the vista driver from Lenovo's site, run the exe which unpacks it to "C:\DRIVERS\Vista\Audio". Then I go back to device manager and make sure the device is uninstalled and do a scan. Naturally yet again "New Device Found" to which it says "Install software automatically (Recommended)", to that I say "Nope I got it this time" and select "Install from a list or specific location (Advanced)". So then it asks "Search for teh best diver in these locations?" and again I say no and choose "Don't Search. I will choose the driver to install" (Its not that I don't know if that would work but my guess is XP wouldn't think the Vista driver was "the best driver to install"). So from that point it asks me what kind of driver (This seems kinda stupid its not like im gonna be loading a printer driver I am obviously doing sound which in a perfect world would at least be the default) I scroll almost all the way down and find Sound. Windows then brings up a list of available drivers or allows me to click a "Have Disk" button. I choose Have Disk point it to the location of my spiffy new vista driver C:\DRIVERS\Vista\Audio\I386\VISTA it sees the file ADIHDAUD.inf. I click open to and continue though the prompts where it complains that the driver is not signed or some jazz. Then the most amazing thing happens... I hear "Ding!" to which I already know what XP is about to tell me and that is that the driver installed successfully.

So if you come across this issue and your PC is using something like what this T61 is (SoundMAX) you might want to give the Vista audio driver a shot, hey it worked for this laptop. ;P

Note: After a reboot SMAX4PNP complained about the wrong version or something so I went to windows search (the link at the bottom of the "Desktop Search" if you have desktop search installed") and found smax4pnp.exe was installed at C:\Program Files\Analog Devices\Core I then replaced the SMAX4PNP.exe in that folder with the older XP version located at C:\DRIVERS\WIN\Audio\SMAXWDM\W2K_XP then rebooted and no more error popup ;)

Tags:

General

Installing Lighttpd with Mono support

by kkikta 27. March 2011 18:55

Below are the steps I used to get mono and lighttpd installed on my Ubuntu 10.104 LTS node from linode.com.

First I installed lighttpd using aptitude:

user@li35-84:~$ sudo aptitude install lighttpd

Next I needed support for .Net 2.0

user@li35-84:~$ sudo aptitude install mono-fastcgi-server

Then I created the file /etc/lighttpd/conf-available/15-mono.conf and added the following text using VI

#Mono Stuff
# Add index.aspx and default.aspx to the list of files to check when a
# directory is requested.
index-file.names += (
        "index.aspx",
        "default.aspx"
)


### The directory that contains your Mono installation.
# The "bin" subdir will be added to the PATH and the "lib" subdir will be
# added to the LD_LIBRARY_PATH.
# For a typical system-wide installation on Linux, use:
var.mono_dir = "/usr/"
# For an installation in a user account (lighttpd need read/exec access):
#var.mono_dir = "/home/username/mono-1.2.6/"

### A directory that is writable by the lighttpd process.
# This is where the log file, communication socket, and Mono's .wapi folder
# will be created.
# For a typical system-wide installation on Linux, use:
var.mono_shared_dir = "/tmp/"
# For an installation in a user account (dir must exist and be writable):
#var.mono_shared_dir = "/home/username/lighttpd_scratch/"

### The path to the server to launch to handle FASTCGI requests.
# For ASP.NET 1.1 support use:
#var.mono_fastcgi_server = mono_dir + "bin/" + "fastcgi-mono-server"
# For ASP.NET 2.0 support use:
var.mono_fastcgi_server = mono_dir + "bin/" + "fastcgi-mono-server2"

### The root of your applications
# For apps installed under the lighttpd document root, use:
var.mono_fcgi_root = server.document-root
# For apps installed in a user account, use something like:
#var.mono_fcgi_root = "/home/username/htdocs/"

### Application map
# A comma separated list of virtual directory and real directory
# for all the applications we want to manage with this server. The
# virtual and real dirs. are separated by  a  colon.
var.mono_fcgi_applications = "/:."

Once the mono settings were created I created a file (25-domain.com.conf) for the virtually hosted domain enabeling mono.

        server.modules   += ( "mod_fastcgi" )

        $HTTP["host"] =~ "domain\.com$" {
        server.document-root = "/var/sites/domain.com"
        server.errorlog = "/var/log/lighttpd/domain.com/error.log"
        accesslog.filename = "/var/log/lighttpd/domain.com/access.log"
        fastcgi.server  = (
                ".aspx" => ((
                        "socket" => mono_shared_dir + "fastcgi-mono-server-domain",
                        "bin-path" => mono_fastcgi_server,
                        "bin-environment" => (
                                "PATH" => "/bin:/usr/bin:" + mono_dir + "bin",
                                "LD_LIBRARY_PATH" => mono_dir + "lib:",
                                "MONO_SHARED_DIR" => mono_shared_dir,
                                "MONO_FCGI_LOGLEVELS" => "Standard",
                                "MONO_FCGI_LOGFILE" => mono_shared_dir + "fastcgi.log",
                                "MONO_FCGI_ROOT" => "/var/sites/domain.com",
                                "MONO_FCGI_APPLICATIONS" => "/:/var/sites/domain.com"
                        ),
                        "max-procs" => 1,
                        "check-local" => "disable"
                ))
        )
        fastcgi.map-extensions = (
                ".asmx"   => ".aspx",
                ".ashx"   => ".aspx",
                ".asax"   => ".aspx",
                ".ascx"   => ".aspx",
                ".soap"   => ".aspx",
                ".rem"    => ".aspx",
                ".axd"    => ".aspx",
                ".cs"     => ".aspx",
                ".config" => ".aspx",
                ".dll"    => ".aspx"
        )
}

I had read quite a bit of documentation telling me that I should not map a particular extension and or use the fastcgi.max-extensions and just process everything but I found that doing so prevented web services (axd) files from processing. Next it was time to enable the config changes in lighttpd by linking the files into the conf-enabled folder.

user@li35-84:~$ sudo ln /etc/lighttpd/conf-available/15-mono.conf /etc/lighttpd/conf-enabled/
user@li35-84:~$ sudo ln /etc/lighttpd/conf-available/25-domain.com.conf /etc/lighttpd/conf-enabled/

At this point it was necessary to create the directories where logs would be stored.

user@li35-84:~$ sudo mkdir /var/log/lighttpd/domain.com
user@li35-84:~$ sudo chown -R www-data:www-data /var/log/lighttpd/domain.com

Then create the directory were the website files will be stored

user@li35-84:~$ sudo mkdir /var/sites/
user@li35-84:~$ sudo mkdir /var/sites/domain.com

Last restart lighttpd

user@li35-84:~$ sudo /etc/init.d/lighttpd restart

There ya go now you have a server capable of running Mono compatable applications like this blog.

Tags:

.NET | Blog | BlogEngine.NET | Mono | Ubuntu

Blog migration from DasBlog to BlogEngine.net

by kkikta 25. March 2011 23:32

It has been a bit of a chore but I believe I have successfully migrated this blog. As usual I have over complicated the issue by relaunching the blog on a linode virtual server. That's right from Windows, IIS and Microsoft.Net to Ubuntu, lighttpd and Mono. The migration has not be as smooth as I hoped, it has requiring a few edits to the source. I will try to follow this post with what it took a bit later but for now it works!

Tags:

Lighttpd | Ubuntu | Mono

1060063 - There is not formula for this member

by kkikta 9. March 2011 17:53
Searched around for this error and found nothing. Assuming I find a new home for my blog that wont happen in the future.

Anyway I am being told this error message occurs when a level 0 member is dynamically calculated. In my case that is odd because the member in question has a formula. That's all for now, I will update if I find the solution.

Tags:

General | Oracle

Essbase API

by kkikta 7. January 2011 15:36

On and off for the last few months I've been playing with the Essbase API and trying to initialize it in C#. Apparently I am in need of some assistance, for the life of me I can't figure out how to get this thing started. I refuse to accept the idea that I should use the JAVA API and expose the functionality through web services (this is what Dodeca does). So really this is just a rant and maybe a shout out asking if anyone has some samples. Coming from a development background I have been kinda shocked that there is so little code available for public view with regards to this API.

Anyway here are some things I was trying this morning but I am giving up on for now and gonna go work on my IMAP stuff.

 

 

public unsafe struct EssbaseInit
{
    public ulong Version;
    public ushort MaxHandles;
    public string LocalPath;
    public string MessageFile;
    public string HelpFile;
    public ushort ClientError;
    public ushort ErrorStack;
    public ushort usApiType;
    public Int64 vbCallbackFuncAddress;
}
[DllImport("lib\\esbapin.dll")]
public static extern long EsbInit(IntPtr init, ref long instance);
public static unsafe long EssInit(ESB32.EssbaseInit init, ref long instance)
{
    int size = Marshal.SizeOf(typeof(ESB32.EssbaseInit));
    IntPtr handle = Marshal.AllocHGlobal(size);
    Marshal.StructureToPtr(init, handle, true);
    return EsbInit(handle, ref instance);
}

Tags:

Oracle

Month List

Page List