FTP 12002 ERROR

자체 개발한 프로그램으로 FTP 연결을 통한 파일 업/다운 로드 시, 12002 timeout ERROR 가 발생하는 경우가 왕왕 있다.

오늘, 회사 Application 에서 FTP 연결로 파일을 업/다운 로드 하는 모듈에서 장애가 발생했다.
테스트를 위해 Filezila와 같은 기타 다른 FTP 통신을 해보면 정상으로 잘 된다.

분석한 결과, 해당 오류는 윈도우 내, 방화벽의 문제로 확인되었다.
방화벽을 해제하고 다시 프로그램으로 FTP 전송을 시도하니 정상적으로 되었다.

지금까지의 경험으로 보아 대부분의 경우, 이는 방화벽의 문제로 분석된다.
혹은 내부망내 구성된 IDS 와 같은 보안 시스템에 의해서 발생되었다.

만약, 앞으로도 FTP 12002 오류가 발생한다면 참고해도 좋을 것 같다.

size_t warning. int’ is smaller than type ‘unsigned long

사내 HP-UX 서버에서 컴파일을 하다, 아래의 Warning 이 나왔다.

Warning (suggestion) 887: “SharedMemory.cpp”, line 711 # Type ‘int’ is smaller than type ‘unsigned long’, unwanted widening in value may result.        memset(szTotalHexData, 0x00, (iSize * 3) + 1);                                      ^^^^^^^^^^^^^^  

이유인즉, unsigned long type 이 와야 하는데, int type 이 왔다는 것.

이상할 것이 없어서 memset man 페이지를 확인해 보았다.

      void *memset(void *s, int c, size_t n);

결론은, 저 size_t 의 type. 그냥 int 형 타입인 줄 알았는데, 그게 아니었다. unsigned long type 이었다.

혹시나 HP-UX aCC 에서만 적용되는건 아닌가 싶어서 g++ 에서도 찾아보았다.

확인 결과, 둘 다 unsigned long type 이 맞았다.

g++-4.7.3

#ifndef __SIZE_TYPE__
#define __SIZE_TYPE__ long unsigned int
#endif
#if !(defined (__GNUG__) && defined (size_t))
typedef __SIZE_TYPE__ size_t;

aCC: HP ANSI C++ B3910B A.03.37

#include <sys/stdsyms.h>

#ifndef _SIZE_T_INCLUDED
#       define _SIZE_T_INCLUDED

#       ifndef _SIZE_T
#               define _SIZE_T
_NAMESPACE_STD_START
                        typedef unsigned long size_t;
_NAMESPACE_STD_END
#       endif /** _SIZE_T **/

#endif /** _SIZE_T_INCLUDED **/

 

 

 

 

How to check HP-UX CPU info

HP-UX에서 CPU 정보 확인

* HP-UX 11.11 에서

 – #sam 실행 후

   Performance Monitors > System Properties > Processor

  – #getconf KERNEL_BITS                 ; Kernel 비트수 확인 -> 예) 64bit

* HP-UX 11.31 에서

  – #machinfo

출처 : http://blog.daum.net/comoffi/8517003

Lec 19 | MIT 6.00SC Introduction to Computer Science and Programming, Spring 2011

[youtube]http://youtu.be/miw2CiKp1r0[/youtube]

Lecture 19: More Optimization and Clustering

This lecture continues to discuss optimization in the context of the knapsack problem, and talks about the difference between greedy approaches and optimal approaches. It then moves on to discuss supervised and unsupervised machine learning optimization problems. Most of the time is spent on clustering.

Introduction To Algorithm..

정말 오랫만에… Introduction To Algorithm 책을 봤다.

내가 이 책을 샀던 때는 군대에 있을 때였는데.. 아직까지 끝까지 읽지 못했다.

아니… 100p를 넘기지도 못했다…

나 자신에게 정말 미안함을 느낀다..

발전없는 내 모습이 보인다.