Tag Archives: EN

Hyperbolic cosine

Some time ago someone asked me to write my own implementation of the hyperbolic cosine (http://pl.wikipedia.org/wiki/Funkcje_hiperboliczne) based on the Taylor series.

A quick proof-of-concept version:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

double silnia (double n){
    if (n <= 1) return 1;
    else return silnia(n - 1)*n;
}

double mycosh(double z){
    double result = 1;
    int ilosc_wyr_ciagu = 30;
    int i;
    for (i = 1; i < ilosc_wyr_ciagu; i++){
        result += pow(z, 2*i) / silnia(2*i);
    }
    return result;
}

int main(int argc, char *argv[]) {
    double arg, c1, c2, blad;
    arg = 3.113408;
    c1 = cosh(arg);
    c2 = mycosh(arg);
    blad = abs(c2-c1)/c2;
    printf(" z=%f; cosh(z)=%f; mycosh(z)=%f; blad=%.90f \n", arg, c1, c2, blad);
    system("PAUSE");
    return 0;
}

More vCenter Server problems – database in suspect mode

After a few surprises that appeared less than a month ago in the article https://www.karolszczepanowski.pl/2015/02/24/problemy-z-vmware-vcenter-server-5-5/, it was time for another one…

This time the vCenter database stopped with the not very informative note “(Suspect)”, probably because something broke after a power failure (again).

Fortunately someone has already described the problem, so here is the source link:

http://www.vmdude.fr/en/tips-tricks-en/suspect-vcenter-database-on-sql-express/

Problems with VMware vCenter Server 5.5

A collection of a few problems I recently encountered with vCenter…

Problem: entries in the log C:\ProgramData\VMware\VMware VirtualCenter\Logs\Vpxd-XXX.log:

2015-02-03T17:04:41.874+01:00 [06244 error 'win32vpxLdap_win32'] [LDAP Client] Failed to add LDAP entry CN=396B4052-A620-474B-BE8E-0446D1E1E831,OU=ComponentSpecs,OU=Health,dc=virtualcenter,dc=vmware,dc=int: 0x68 (The object already exists.)

Solution: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2044680

Problem: entries in C:\ProgramData\VMware\VMware VirtualCenter\Logs\wrapper.log:

INFO | jvm 1 | 2015/02/02 17:09:21 | SEVERE: Unable to expose the remote JMX registry.
INFO | jvm 1 | 2015/02/02 17:09:21 | java.lang.IllegalArgumentException: Port value out of range: -1

Solution: VMware documentation

In short: edit the base.jmx.port variable in C:\Program Files\VMware\Infrastructure omcat\conf\catalina.properties:

base.jmx.port=-1

change it to:

base.jmx.port=6969

Problem: how to restore the configuration, in other words generally about configuration backup (but this is worth doing earlier ;-P).

Solution: VMware KB 1029864

Problem: where are the logs stored?

Solution: typical log locations:

C:\ProgramData\VMware\Infrastructure\Inventory Service\Logs
C:\ProgramData\VMware\VMware VirtualCenter\Logs

Problem: what does the vCenter database structure look like?

Solution: http://support.hp.com/pl-pl/document/c01271538